HDLPlanet Knowledge Capsule Oct 2003 ------------------------------------------------------------------------------- "All truth passes through three stages. First, it is ridiculed. Second, it is violently opposed. Third, it is accepted as being self-evident." - Arthur Schopenhauer (1788-1860) Editor's note : Good Morning... I was thinking whether the name "news letter" is really suitable for the kind of information captured in this e-zine. It is very less news and more of knowledge. So I decided to name it as "Knowledge Capsule" which is also the name of the main section involved in this e-zine. So... your knowledge is sure to grow with every "Knowledge Capsule". I. Tools in News ------------------------------------------------------------------------------- - Mentor Graphics claims that it has improved simulation performance by 2x in its latest modelsim release (Modelsim 5.7) http://www.model.com/news_events/pr/modelSim57.pdf - HDL & Matlab co-simulation : Aldec's Active-HDL version 6.1 allows system designers to cosimulate models in Simulink and digital logic developed in Active-HDL. http://www.eedesign.com/story/OEG20031022S0026 II. Knowledge capsule ------------------------------------------------------------------------------- o For the blooming professionals - Article : Physics is not the hurdle for scaling CMOS http://www.eet.com/futureofsemis/limits/OEG20030923S0037 o For the budding professionals
- What is Superscalar Architecture ? In a simplest computer architecture, only a single instruction can be executed in a clock cycle. In a "superscalar" architecture, extra compute resources are added to achieve another dimension of instruction-level parallelism. Superscalar architecture refers to the use of multiple execution units, to allow the processing of more than one instruction at a time. This can also be thought of as a form of "internal multiprocessing". Most of the operations involving PC (Program Counter) is with the integer information. The same integer handling unit can't be used for floating-point operations. They are handled differently using a dedicated unit called the floating point unit (FPU). (Yes, on some computers, the integer units do have the capability to handle floating point data, but relatively slower than the dedicated units. Older processors have only one of these units, and instructions are processed sequentially. Present day processors use multiple execution units allowing more than one instruction to be executed simultaneously, increasing performance. Processors with this capability are said to be Superscalar. The original Pentium provided 2 separate pipelines that Intel called the U and V pipelines. In theory, each pipeline could be working simultaneously on 2 differerent sets of instructions. Being superscalar is not so easy, it comes with much more headache. Since multiple instructions can be despatched to multiple execution units (pipelines) simultaneously, the data on one pipeline could depend on the other and could have data hazards. Though data hazards are possible on processors with sigle pipeline also, the complexity involved in resolving it in superscalar processors is much more. Control hazards can get worse since instruction fetch bandwidth increases (doubled for dual pipelined machine). Mispredicted branches may require both pipelines to be flushed. All these and many more such cases need to be taken care of in the Superscalar Architecture. - What is DMA (Direct Memory Access) ? It is a means by which a peripheral can control the processors memory bus independently without actual intervention from the processor. There is a good article published about "Introduction to Direct Memory Access" worth reading. Follow the below Link: http://www.embedded.com/shared/printableArticle.jhtml?articleID=15300200 III. Automation Arena ------------------------------------------------------------------------------- Learning Tcl made easy - Part 2 Control Flow As in any other programming language (like C), Tcl also has "if", "while" and "for" as the basic control flow constructs. One other construct in Tcl is "foreach", this doesn't have a C equivalent. Another useful construct is the "switch" construct. This is very similar to the case construct in C. If Construct : if { condition1 } { -------- } elsif { condition2 } { -------- } else { -------- } While Construct : while { condition } { -------- } Foreach Construct : (Example) set cities { Bangalore Houston Amsterdam } foreach city $cities { puts "$city"; } This is result in printing the following on STDOUT: Bangalore Houston Amsterdam Switch Construct : (Example) switch $alpha { a { puts "found a"} b { puts "found b"} c { puts "found c"} } Arrays Arrays are always unidimensional but the index is a string. If you use a separator in the index string (such as ',', '-'), you can get the same effect than with a multidimensional array in other languages. Example : set temperatures { Bangalore 10 20 Delhi 5 35 Rajkot 15 35 } foreach {town Tmin Tmax} $observations { set Temp($town-min) $Tmin set Temp($town-max) $Tmax } Temp is an array here, $town-min and $town-max are the array indices Tmin and Tmax are the values. So this way the unidimensional array temperatures can be viewed as multidimensional by having it defined like the array Temp. Procedures Procedures are equivalent to C functions. Example : proc sum2 {a b} { expr $a + $b } If the procedure doesn't contain a return statement, the value computed in the last statement is itself the return value. Hence the above procedure is same as the one below. proc sum2 {a b} { return [expr $a + $b] } Eval Command - Concatenate all its arguments in one string - splits this string using spaces as separators - evaluate the command sentence formed by all the substrings Example : proc sum {args} { set result 0 foreach n $args { set result [expr $result+$n] } return $result } proc average {args} { return [expr [eval sum $args] / [llength $args]] } If you had omitted the 'eval' command in the previous example, the 'sum' procedure would have returned an error because 'sum' should be called with only one string argument (in the previous example, this argument would have been '45.0 65.0 78.0 55.0') while 'sum' is expecting numerical arguments. More in the next part. --- END of Part 2 --- IV. Editor fundas ------------------------------------------------------------------------------- How to display line numbers in VI/VIM/GVIM ? :set number <- Displays the line numbers :set nonumber <- Doesn't display the line numbers A short form also exists for this command :set nu <- Displays the line numbers :set nonu <- Doesn't display the line numbers V. Humour ------------------------------------------------------------------------------- What is a Telescope ? The telescope is in fact, an image transference device left to us by ancient astronauts millions of years ago (MYA). When you look into the telescope, the telescope uses an advanced aura-detection algorithm (ADA) which has cataloged every possible genetic makeup of every human that has ever lived, been born or is yet to be born and automatically attempts to adjust focus and lighting. Unfortunately, the database was created MYA before the Gutenberg Press was invented. The Gutenberg Press is solely responsible for humans requiring optical support devices (OSD). So, that is why we must manually focus the telescope every time we step up to it -- the aliens forgot to account for the printed word screwing our eyesight up. Once the ADA has acquired your DNA coding and attempted to adjust for your personal visual discrepancy (PVD), it sends a request out to the base station in question via warped time/space (VWTS). The base station in turn, sends you back it's favorite postcard-quality image through the warped time/space (WTS not to be confused with VWTS) and you get an image. All celestial bodies including nebula and black holes have base stations left by the aliens a gazillion years ago (GYA). Black holes, unfortunately, never developed an imaging device strong enough to break through its gravitational pull so that is why you never see anything cool when looking at a black hole.
------------------------------------------------------------------------------- Disclaimer: Unless otherwise stated the copyrights on all the information provided in this newsletter and also the trademarks belongs to their respective owners. Keeping the focus of HDLPlanet on knowledge sharing, the information here could be just a collection from other sources. This newsletter also doesn't quote for any particular company. The links provided here are verified at the time of publishing of the newsletter. We don't guarantee the existence of the contents in the links all time. ------------------------------------------------------------------------------- HDLPlanet Newsletter Oct 2003