Category: rkocvizm

Three techniques for measuring application performance improvement

first_imgDio_ChannelWrite(PORTA_0, LOW);MyTestFunction();Dio_ChannelWrite(PORTA_0, HIGH);Listing 2 – Indirectly accessing the port register to toggle the pin low while the function is executing through a hardware abstraction layer.Technique #2 – Setup a TimerA second technique that can be used to measure time is to setup a hardware timer. There are two ways that the hardware timer could be used. First, it could be used as a single shot timer where the timer is started right before calling the function. Second, the timer could be set to run constantly and be read before and after the function call. In this case, a developer would have to add extra code to calculate the difference between start and stop values in the timer register. An important tip to note is that you need to make sure that the timer ticks at a high enough resolution to capture the difference. For example, a timer tick of 1 millisecond might be too large. A step size of 10 microseconds would probably be a good starting point. Listing 3 and Listing 4 show some pseudocode on how the timer might be used to measure the time differences.Timer_Start(TIMER_1);  // Start clears the timer register countMyTestFunction();Timer_Stop(TIMER_1);TimerCount = Timer_Read(TIMER_1);Listing 3 – Example using driver API’s to start and stop a timer to measure directly how long the function took to execute.CountStart = Timer_Read(TIMER_1);MyTestFunction();CountStop = Timer_Read(TIMER_1);ElapsedTime = (CountStop – CountStart) * TimerTickUnit;Listing 4 – Example using a running timer to measure how long a function took to execute. Care must be taken to make sure the timer reads are atomic.Technique #3 – Use the ITMA third technique that can be used but is dependent upon the microcontroller architecture and hardware that is available is to use the instruction trace microcell (ITM). The ITM is typically available on Arm Cortex-M processors and is designed to allow developers to quickly pass trace information to the debugger without a lot of software overhead: the hardware does the heavy lifting. The software is really simple. First, a developer needs to make sure that they include the core header file for their microcontroller. For example, if I was working on a Cortex-M4, I would include core_cm4.h. The header file includes an important function for accessing the ITM called ITM_SendChar. We can use ITM_SendChar to send a character through the ITM before and after the function executed as shown in Listing 5.ITM_SendChar(‘A’);MyTestFunction();ITM_SendChar(‘A’);Listing 5 – The Arm function ITM_SendChar can be used to send a data byte over the ITM before and after the function executes to get timing information about the function.Each ITM packet contains more than just the character but also the packets cycle count. The difference between the cycle count for before and after the function can be used to get how many CPU cycles have elapsed. This can be seen in Figure 1 where ITM Port 1 is used to show the start of the function of interest and ITM Port 2 is used to show the end of the function of interest. In this case we can see a difference of 16 cycles (My test function was trivial in this example).Figure 1 – Example screenshot showing the ITM being used to monitor the cycle count between events. In this screenshot, ITM Port 1 is being used to show the start of the function and then ITM Port 2 is being used to show the end of the function.ConclusionsIn this post, we have examined three techniques that developers can use to measure performance increases in their software. These techniques all work whether you are writing bare-metal or RTOS based applications. Each technique does require that a developer instrument their software so keep in mind that there may be additional overhead added to the measurements. Selecting a single technique though will provide an apple to apples comparison.What additional techniques can you think of that can help developers measure their applications execution?Jacob Beningo is an embedded software consultant, advisor and educator who currently works with clients in more than a dozen countries to dramatically transform their software, systems and processes. Feel free to contact him at, at his website, and sign-up for his monthly Embedded Bytes Newsletter. Share this:TwitterFacebookLinkedInMoreRedditTumblrPinterestWhatsAppSkypePocketTelegram Tags: Design Methods In a previous article, I wrote about how developers can speed up their application code by executing time sensitive functions in RAM rather than from flash. You might be wondering if you were to make such an adjustment, what would the performance change be? The answer will vary based on the microcontroller’s fabrication technology but there are three techniques that developers can use to measure their applications or a functions performance:Toggle an I/O pinSetup a timerUse the ITMLet’s examine each of these techniques in detail.Technique #1 – Toggle an I/O pinThe first and oldest trick in the book is to use a spare I/O pin and toggle it before and after a function is executed. We would want to do this measurement twice. First, while the function is still being executed from flash. Second, once we have moved the function to execute from RAM or when we have made whatever optimization it is that we are interested in. The code to do this is extremely simple and could be done by directly manipulating the bit or through a hardware abstraction layer as shown in Listing 1 and Listing 2. (Note the assumption for this code is that the port bit was initialized as output and set high).PORTA &=~0x1;MyTestFunction();PORTA |= 0x1; Listing 1 – Directly accessing the port register to toggle the pin low while the function is executing.center_img Continue Reading Previous DATA MODUL: 23.1” ultra-stretched TFT display with smart controlNext Industrial Internet Consortium and OpenFog Consortium join forceslast_img read more

Read More Three techniques for measuring application performance improvement

Davis Cup: India fancy chances against formidable Italy in World Group qualifiers

first_imgIndia would strive to make the most of home conditions, a favourable surface and format to battle history and higher ranked Italy in a Davis Cup World Group qualifiers tie here from Friday.India, led by non-playing captain Mahesh Bhupathi, will be playing on the iconic South Club grass court, a surface the Italians have not had the most success in recent years.Bhupathi, who made his debut as a Davis Cup player at the South Club 24 years ago, has been bullish about this being India’s best chance to advance to the elite World Group stage of the Davis Cup for the first time since 2011.Besides the surface, the duration of the matches in the new format – best of three sets rather than the usual five — also gives India some advantage.Traditionally, India have been stronger in the doubles rubber and would look forward to day two of the two-day meet. Veteran Rohan Bopanna and Divij Sharan are in good form too, having recently clinched the Maharashtra Open.But India need three points to win the match and therefore, the country’s two highest ranked singles players Prajnesh Gunneswaran and Ramkumar Ramanathan would have to continue the good work they have been doing over the past year.@ramkumar1994 faces Andreas Seppi in the opening rubber of the #DavisCupQualifier between India and Italy Cup (@DavisCup) January 31, 2019Ramanathan (133) reached his first ATP final on grass at Newport last year, while Gunneswaran (102) has soared to a career high 102 and is coming off his first Grand Slam main draw appearance.advertisementRecent Cup history, though, is against the hosts. Every time in the last five years, India had been in a situation where they needed to beat a higher ranked opponent to advance to the World Group stage, they floundered in the singles rubbers.Italy’s non-playing captain Corrado Barazzutti has maintained that rankings don’t matter in the Davis Cup and they are favourites only on paper.The visitors, spearheaded by World No.19 Marco Cecchinato, boast of three players ranked inside the top 60 in the world — Andreas Seppi (37) and Matteo Berrettini (54) being the other two.The South Club, which is hosting the competition after 16 years, has previously seen some epic ties played on its grass courts, none more theatrical than India’s 3-2 upset win over more fancied Switzerland, a match in which Leander Paes and Ramesh Krishnan prevailed over higher-ranked Jakob Hlasek and Marc Rosset.”It was one of the most memorable matches in Davis Cup history as it rained so much that the match was about to be called off. The referee had already booked his ticket back home. We worked whole night to get the court ready. In the morning, the referee came and said it is ‘Indian black magic’,” Bengal Tennis Association COO Sujoy Ghosh recollected.India’s 3-2 win over Brazil in 1966 is another memorable tie at the venue where Jaidip Mukerjea and India’s most singles winner Ramanathan Krishnan starred for the hosts and in one tie Krishnan came back from 2-5 to beat Brazil’s Thomaz Koch 7-5 over four days.While most of these players have retired long back, homeboy Paes is still around but since helping India win against China in the Asia/Oceania Group I tie last April, the 45-year old icon has been sidelined.India, three-time Davis Cup runners up, fell 4-0 to Serbia in their World Group play-off clash last September and then were drawn to play against Italy at home in the qualifiers in their bid for a place in November’s 18-team Finals in Madrid.The Indian team will look back at the 3-2 triumph over the Italians for inspiration. The combination of Vijay Amritraj and Ramesh Krishnan had led India to the win at the same venue 34 years ago in 1985.However, overall, the Italians — who have lifted the Davis Cup once in 1976 — lead 4-1 head-to-head.The Davis Cup will also start a new era this weekend as the revamped team competition kicks off with 12 qualifying-round ties spread across the globe to decide which nations progress to November’s finals week in Madrid.India vs Italy – ScheduleFriday, February 1SinglesRamkumar Ramanathan vs Andreas SeppiPrajnesh Gunneswaran vs Matteo BerrettiniSaturday, February 2DoublesRohan Bopanna/Divij Sharan vs Marco Cecchinato/Simone BolelliSinglesPrajnesh Gunneswaran vs Andreas SeppiRamkumar Ramanathan vs Matteo Berrettinilast_img read more

Read More Davis Cup: India fancy chances against formidable Italy in World Group qualifiers

Who will be the Elite?

first_imgBy BEN HARRISMen’s Elite EightThe question on everybody’s lips is: “Will it be NSW Mets’ year?”The Mets have lost two matches in the two-year history of the Elite Eight series at the X-Blades National Touch League – the two grand finals.In 2011, the inaugural Elite Eight tournament, Mets were beaten 7-6 by NSW Scorpions in the grand final in the last few seconds of the match.The Mets were unbeaten in the tournament before losing the final.Last year, Mets were unbeaten when they reached the grand final against NSW Country Mavericks.Mets went down in the final few seconds of the match 5-4.Mets have a team full of big match international experience with Steve Roberts, Anthony Ziade, Nicholas Good, Ben Moylan, Scott Buckley, Robert Nakhla and Trent Touma lining up, so there should be no excuse this time.However, it won’t be an easy run as all the Elite Eight sides will be at their best with selection for the 2015 Touch World Cup up for grabs at this tournament.Scorpions have two-time Elite Eight Most Valuable Player in Sam Brisby.Brisby and Simon Lang are the leading touchdown scorers in Elite Eight with 16 and 17 touchdowns respectively.The Mavericks look strong on paper and the defending champions will be led by the likes of Dylan Hennessey and Dylan Thompson.Not to be forgotten, NSW Rebles, Queensland South Stingrays, Queensland Chiefs, Queensland Country Outlaws and The Alliance have all strong line-ups this year.Women’s Elite Eight        While the men’s NSW Mets team have fallen short when it comes to winning the big game at the X-Blades National Touch League, the Mets’ women’s side is the exact opposite.The Mets are two from two when it comes to Elite Eight, defeating NSW Country Mavericks 9-4 in 2011 and Queensland Chiefs 5-4 last year.They could make it a hat-trick this week especially with Paul Sfeir at the helm.The current Australian Men’s Open assistant coach brings plenty of knowledge and experience to the team.However, Australian Women’s Open captain Lousie Winchester won’t be playing this week, which does leave the door ajar for the other teams.Chiefs should have won last year but were swept away by Mets in the final.The Queensland side will be without 2013 Most Valuable player Emily Hennessey but they do have experienced campaigner Peta Rogerson.She will be backed up by plenty of other Australian representatives.In the race for the title will also be NSW Mavericks and NSW Scorpions, both reached the semi-finals in 2011 and 2013.Queensland Country Outlaws, Queensland South Stingrays, The Alliance and NSW Rebels should not be taken lightly.Related LinksWho will be the Elite?last_img read more

Read More Who will be the Elite?

Impossible Choices Stars Join UN To Create CallToAction For Humanity

first_imgImpossible choices are being made every single day by the more than 125 million people in desperate need of humanitarian assistance around the globe. To spark action ahead of the first-ever World Humanitarian summit, the United Nations (UN) has launched a global, interactive digital experience that aims to inspire commitment to meaningful change in the name of humanity.Video: Impossible choicesThe digital challenge at Impossible features a three-minute, online journey based on real experiences people in crises often face. At the end of the online experience, users can share results across their respective social platforms and call upon global leadership to attend the Summit, and take bold action.“Arguably one of the most powerful tools at our disposal today is social media – it can give a voice to the voiceless, create instant awareness and drive change in ways never before seen around the world,” said Stephen O’Brien, UN Humanitarian Chief. “With Impossible Choices, we are calling upon the digitally-connected to help create a movement towards showing world leaders that the world is looking to them to make bold decisions and act for the good of humanity.”Celebrity influencers have also joined the call to action with a powerful short film highlighting the current global humanitarian crisis. Global stars, including Daniel Craig, Forest Whitaker, Rosario Dawson, Cody Simpson, Big Sean, Michael Douglas, Alfre Woodard, Yara Shahidi, Mallika Sherawat, Catarina Furtado and Princess Haya Bint Al Hussein, speak passionately to the current refugee crisis and, together with thought-provoking footage of the ongoing plight of displaced people, address the core struggles and impossible choices being faced daily by men, women and children around the globe who are homeless, without healthcare or education and being subjected to constant violence.The announcements will be broadcast on Turkish Airlines flights, a World Humanitarian Summit Sponsor, and across social media throughout the month of May leading up to the Summit.In an effort to ensure the campaign maintains the most authentic possible voice, the UN has also appointed 20 Champions for Humanity, a group of influential individuals – from CEOs to photographers, philanthropists to entertainers – to kick-off the Impossible Choices campaign and gather support from within their networks.Today is just the start. Impossible Choices aims to build momentum towards the World Humanitarian Summit, set to take place in Istanbul from May 23 – 24. The Summit is the result of UN Secretary-General Ban Ki-moon’s three years of consultations with more than 23,000 people in 150 countries. It will bring together heads of state, business leaders, civil society representatives, and humanitarian workers to create clear, actionable goals for change, grounded in the one value that unites us all: our common humanity.For more information about the World Humanitarian Summit, go to To take Impossible Choices the three-minute challenge, go to read more

Read More Impossible Choices Stars Join UN To Create CallToAction For Humanity

Tesla to raise money after painful 1Q and Musk is buying in

PALO ALTO, Calif. — A week after revealing a huge first quarter loss and the need to raise cash, Tesla is doing just that with CEO Elon Musk buying $10 million in new shares being offered as part of a stock and debt offering that could raise more than $2 billion.Tesla said Thursday that it’s selling $650 million of common stock and $1.35 billion in convertible senior notes due in 2024 in two separate offerings. The company is giving the underwriters a 30-day option to purchase up to an additional 15% of each offering.That would add up to about $2.3 billion before discounts and expenses and if the underwriters fully exercise their options.Last week, Tesla reported its cash balance at the end of the first quarter shrunk by $1.5 billion since December, to $2.2 billion. Musk said during a conference call that Tesla might need to raise capital again.The offering will give it enough liquidity to pay $566 million in notes that mature in November, plus provide cash to expand distribution of Tesla’s Model 3 in Europe and cover any spending needed from softening demand for all three of Tesla’s models in the U.S., Moody’s Senior Vice-President Bruce Clark said Thursday in a statement.Still, Moody’s kept a negative outlook and B3 rating on Tesla debt. That is six notches below investment grade.In a March 30 note, the ratings agency wrote that the Model 3, Tesla’s lowest-price model, currently sells for an average of $55,000. To increase sales, the price has to drop toward $42,000, and to make enough money to pay the bills, Tesla has targeted a 25% gross profit margin on the Model 3, Moody’s said. Currently gross profits on a $42,000 Model 3 are “materially” below 25%, according to Moody’s.“In order to achieve this margin target the company will have to undertake significant reductions in fixed and variable costs associated with the vehicle,” Moody’s wrote. “We expect that it will be a major challenge for Tesla to aggressively increase production/deliveries, shift the product mix toward the $42,000 price level, and simultaneously lower costs enough to achieve the 25% gross margin target.”The Palo Alto, California-based Tesla lost $702.1 million in the first quarter, among its worst quarters in two years. Sales tumbled 31% in the period. Musk predicted another loss in the second quarter but said Tesla would be profitable again by the third quarter.The surprisingly large loss followed the company’s first back to back quarters of profitability.Tesla has lost more than $6 billion since setting out to revolutionize the auto industry. Musk expects that future profits will be driven by rising sales and the arrival of autonomous vehicles dedicated to a new ride-hailing service.Shares of Tesla Inc. closed Thursday up 4.3% at $244.10.The Associated Press read more

Read More Tesla to raise money after painful 1Q and Musk is buying in

Brock Badgers to make history at Meridian Centre

The nationally ranked Brock Badgers men’s and women’s basketball teams will make history Saturday, Nov. 28 when they play the first-ever Brock basketball games at the Meridian Centre in St. Catharines.The game will attract the largest-ever crowd for any Brock sporting event and will potentially be the biggest crowd ever for basketball games held in the Niagara region.After playing their first home game of the regular season on Friday, Nov. 27 at Brock’s Bob Davis Gymnasium, the Badgers will host the Lakehead Thunderwolves in a doubleheader at the Meridian Centre on Nov. 28. The women’s team plays at 5 p.m. with the men taking to the court at 7 p.m. “These games are a fantastic community partnership between Brock, the Meridian Centre and the River Lions,” said Robert Cargnelli, Interim Director, Athletics and Recreation. “It will be an historic night for everyone involved. I know the Badgers players are excited to be part of something as big as this.”Tickets for the doubleheader are now on sale through Ticketmaster. Tickets are $15 for adults and $10 for youths, students and seniors with premium courtside VIP seats also available using the promotional code Alumni. In addition, there are 1,000 tickets set aside for Brock University students, who get free admission to home games with their student fees.The Badgers will play on the basketball court used by the Niagara River Lions, who will start their inaugural season in the National Basketball League of Canada in December. The team shares the Meridian Centre with the Ontario Hockey League’s Niagara IceDogs. read more

Read More Brock Badgers to make history at Meridian Centre

Former BHS worker berates Philip Green on his yacht

first_imgMs Cullen’s letter, which the Mirror publishes in full, details how she felt “so excited” when she joined BHS in 2010 while at sixth-form college.“It felt like I had joined a great team, but sadly now that has all now been broken up, mainly because of your management, or indeed lack of it. Want the best of The Telegraph direct to your email and WhatsApp? Sign up to our free twice-daily  Front Page newsletter and new  audio briefings. Ms Cullen accuses Green of destroying an “iconic part of the British High Street which could easily have been saved.”“I wish the best for everyone who worked for BHS,” her letter concludes. “It survived so long because of them, people who actually cared for it and treated it like it mattered, not you.“I hope you will one day realise the pain and damage you have caused to such a faithful group of people. It is them you have betrayed.”While some of the crew of the yacht, named Lionheart, came outside to listen to Ms Cullen, Green remained ensconced inside, declining the opportunity to meet with his former employee. After the final BHS stores pulled down their shutters for the last time at the weekend, one former staff member traveled to Capri in order to confront ex-boss Sir Philip Green.Hannah Cullen, from Ware in Hertfordshire, traveled hundreds of miles to deliver an angry tirade to the multi-millionaire businessman, who has been criticised for his handling of the company.A Daily Mirror video shows Ms Cullen, 23, using a loudhailer aboard a small dinghy adjacent to Green’s yacht.“Sir Philip Green, my name is Hannah Cullen and I’ve come here to give you a letter,” she calls. “Would you please come out so I can hand it to you. “Over the last six years I’ve watched this once great company fall apart.” “I’m a former employee of BHS and I’ve been made redundant because of you and your actions.“You’re hiding cowardly on your boat, while thousands of people are struggling to find work.“You’re a coward, and I’d like to come and see you to give you the letter.” A BHS store Credit:Reuters This is the yacht Lionheart today near Capri, owned by one Philip Green.— Nick Thompson (@Scoobysnax23) 30 August 2016last_img read more

Read More Former BHS worker berates Philip Green on his yacht

Falconer cleared of hunting charge because he uses golden eagle to hunt

first_img Want the best of The Telegraph direct to your email and WhatsApp? Sign up to our free twice-daily  Front Page newsletter and new  audio briefings. Mr Mease said: “No-one else could have done it quicker.”He denied hunting for sport and described himself as a pest controller.District Judge John Woollard said he had heard no evidence the hunt had made any changes to their activities – other than using the falconer – since the hunting act was introduced in 2005.Joe Bird, prosecuting, alleged that the eagle was used as a “smokescreen” to allow the hunt to continue as it had before the law was changed.He said: “The set up was never going to work. It was a smokescreen.”There were so many occasions when they would not have been able to fly the eagle.”Stephen Welford, defending both men, said: “There is video footage of Mease using his eagle to kill a fox. That would not exist if it was a smokescreen.”Judge Woollard said it was clear Adams had no control over the hounds during the hunt.He was fined £1,000 and ordered to pay a £100 victim surcharge and £930 costs.Hunt Saboteurs Association spokesperson Lee Moon said after the trial: “To anyone who witnessed the events on the day in question it was abundantly clear that a wild mammal was hunted and killed illegally, in a most gruesome manner. “The loopholes and exemptions in the current act have always been cynically exploited by hunts in order to operate much as they would have done prior to the ban.”Adrian Simpson, from the Countryside Alliance, said they believed the judge had made the wrong decision, and said Adams was planning to appeal. John Mease, member of the Fitzwilliam Hunt  The court was also shown headcam footage from Mr Mease taken in November 2013, when he used the golden eagle to catch a fox.He then used a falconers knife to kill the animal by driving the spike through its eye.It took him 47 seconds to kill the fox from the moment it was caught by the eagle. A falconer has been cleared of breaching strict hunting laws because he hunts foxes using a golden eagle.John Mease, 45, was found not guilty after a court heard he used the bird of prey to catch animals as opposed to a pack of dogs.He was further cleared of causing unnecessary cruelty to an animal despite “dispatching” a fox by driving a knife through its eye after it was caught by his raptor in 2013.George Adams, 66, a co-accused Fitzwilliam huntsman, was convicted of using hounds to kill a fox on January 1 2016.Peterborough Magistrates Court was filled with supporters of the hunt and hunt saboteurs during the two-day trial.Magistrates heard that the hunt’s hounds were used to flush the fox out into the open before the eagle was meant to be released to catch the fleeing mammal. Adams, who joined the Fitzwilliam Hunt in 1981 and became a huntsman in 1984, said he had not seen the fox before it was killed.When asked if it was his intention to kill the fox with hounds, he said: “Absolutely not. We wanted to flush it out for the bird of prey.”Mr Mease told the court there was no chance for him to release his golden eagle because the saboteurs were in the field.Asked why he did not radio Adams to call the hunt off, he said: “A hunt is a fluid thing. It was changing minute by minute.”It was the heat of the moment and it was the first time I had come across saboteurs in my 11 years.”He told the court he was in charge of the bird but had no control over the pack of hounds, which was Adams’ responsibility. John Mease, member of the Fitzwilliam Hunt Credit:Peterborough Telegraph / SWNS Video footage filmed by Stephen Milton, a hunt saboteur, showed the 40-hound hunt in a field near Wansford, Cambs, and picked up the sound of a hunting horn.Mr Milton said he did not hear anyone from the hunt calling the dogs off the fox after they picked up its scent.The fox was killed by the pack of hounds and Mr Mease’s golden eagle was not released.last_img read more

Read More Falconer cleared of hunting charge because he uses golden eagle to hunt

The dialect of Ancient Hellenes lecture

first_imgA lecture by renowned academic, linguist and lexicographer F. Rector of the National University and Minister of Education of Greece Professor Dr. George Babiniotis titled: ‘The Dialects of Ancient Hellenes’ will be held this month. When: Tuesday 27 November, 6.30 pm Where: Wright Lecture Theatre, 4th Floor, Medical Building Corner Grattan St and Royal Parade The University of Melbourne, Parkville Facebook Twitter: @NeosKosmos Instagramlast_img

Read More The dialect of Ancient Hellenes lecture

NK poll reflects our political heritage

first_imgThere are many who claim that people are no longer interested in politics. One reason given for this point of view is the claim that representative democracy is too remote from people’s everyday lives and that there are no real differences between the major Australian parties in terms of policies and how they may impact on our lives. This point of view, however, does not appear to be shared by Neos Kosmos readers who voted on our online poll last week by answering the question: “Do you believe that the outcome of the 2013 Australian election will impact on your life?” Seven out of ten respondents indicated that the election result on September 7 will impact their lives. This result can be seen, amongst others, as a reflection of a Greek cultural trait, since the public sphere, public life and politics are highly valued within the Greek culture. This week’s poll question: “Will you be celebrating Father’s Day on Sunday 1 September? Yes or No?” Vote now at Facebook Twitter: @NeosKosmos Instagramlast_img read more

Read More NK poll reflects our political heritage