How to Write Synthesizable VHDL. . How to Control the Implementation of VHDL. demonstrates how to include comments in VHDL source code. The. VHDL. Examples. EE EDA / ASIC Design Lab This structural code instantiate the ODD_PARITY_TB module to create a. testbench for the. Convert Block schematic to 'VHDL code' and 'Symbol'. Note that, this connection can be made using VHDL code as well, which is.
|Language:||English, Spanish, Portuguese|
|ePub File Size:||29.82 MB|
|PDF File Size:||19.25 MB|
|Distribution:||Free* [*Regsitration Required]|
transformation of VHDL code into a gate-level net list were developed already at an early point of time. This transformation is called synthesis and is an integral. code. In this way, you will see VHDL as a valuable design, simulation and not going to help you write better VHDL code, it will only be briefly mentioned here. œ A good general guideline is to assume that if the designer cannot readily determine what logic circuit is described by the VHDL code, then the CAD tools are.
These models are not easy to deal with for beginners, and heavily impact on obtained results. The aforementioned assumption would definitively solve the problem. Log In Sign Up. Modified dependencies graphs. Yet, when considering a behavioral description, memory elements are often implicitly declared, deferring to a post-synthesis phase the use of such elements.
Finally, Section 4 draws some conclusions, also providing further hints for analogies between analysis techniques for software specification and V H D L behavioral description analysis.
Deadlocks Quoting from , deadlocks can be defined as follows: A set of processes is deadlocked if each process in the set is waiting for an event t]hat only another process in the set can cause. Because all processes are waiting, none of them will ever cause any event, and all the processes remain blocked. This definition applies directly to hardware systems modeled by means of interacting C.
A process can either be suspended waiting for an event or need an event to change its outputs. In both cases, events are necessary to allow a circuit to evolve. It evolves while remaining in the same state producing always the same results. This condition is easily detectable by an external observer who always sees the same output values. As to model execution, during the start-up phase, all processes are executed either till the end or till they are suspended waiting for some events to occur.
After this, processes are executed each time there is a change on the signals they are sensible to.
The dynamics of a system either is hard-coded within the specification closed systems or depends on the arrival of external signals open systems. The last point implies that the possibility for a closed system to enter a deadlock condition is a certainty.
Thus a V H D L behavioral description of a closed system with deadlock should be always synthesized by a set of constant values, instead of a real logic circuit. In the case of open systems, a deadlock derives from the timing of external inputs. The absence of a reset signal may become a critical point.
In fact, the reset signal would provide the only means for exiting the deadlock situation placing the circuit in its initial state. Now, the problem is how deadlocks can be uncovered in hardware circuits and, even better, in V H D L behavioral specifications. The condition stated so far is easily detectable by simulation but, to the best of author's knowledge, not by the analysis of designed models. Moreover, when considering systems characterized by a deadlock, even if the simulation highlighted constant outputs in the time domain after a first initialization phase , the synthesis using commercial logic synthesis tools [8,12] did not produce simple constants including set logic but only an unexpected logical circuit.
This is due to the fact that having defined different processes, different finite state machines are synthesized. These finite state machines, possibly, share the logic but not the states due to the implied complexity of obtaining the resulting product machine during synthesis. Therefore, deadlock analysis can be effective for evaluating the quality of the design with respect to the specific problem.
The proposed analysis formalizes the mutual dependencies among events. It is not enough to study dependencies among processes, since each process can wait for events on different signals. Dependencies graphs code this information. Nodes are the signals exchanged among processes and edges define dependencies among them. An edge between a node s and a node t means that there is a change on s only if there is a change on t.
A necessary condition to discover deadlocks: Dependencies graphs apply to both closed and open systems. When an open system is taken into account, its dependencies graph comprises dangling edges entering those nodes signals sensible to external events.
In this way we model processes sensitivity to unpredictable signals. These new edges, however, do not impact on the dependencies, circularities, between signals.
We categorize the circumstances leading to deadlocks into two groups. In this case involved processes exchange only Boolean-like values to guide their behaviors. A rendezvous-like communication protocol is explicitly programmed. A more general class of problems addresses all the values exchanged without constraining the analysis to Boolean-like values only. The former set of models is exemplified in Section 2.
The latter class is studied in Section 2. A V H D L model o f the dining philosophers Dijkstra's Dining Philosophers problem , although not a very realistic problem, does contain a nontrivial deadlock and is probably the most commonly analyzed example in studying synchronization among Ada tasks .
The problem can be formulated as follows: Five philosophers are seated around a table. Between each philosopher there is a single fork. The life of a philosopher consists of periods of eating and thinking. When a philosopher becomes hungry, he tries to get his left and right fork, one at a time, in either order.
If successful in acquiring the two forks, he eats for a while, then puts down the forks and thinks. A problem can arise if each philosopher simultaneously grabs his left right fork and then waits for his right left fork.
If the right left fork is not available, all philosophers starve and a deadlock occurs.
Even if philosophers get their forks at different times, in the worst case, the situation described so far can happen again. By looking at the code, shown in Fig. This solution has been adopted not to have multipie-driven signals that leads to an unsynthesizable code.
The adoption of more than one clock would have led to unsynthesizable models for commercial logic synthesis tools [8,12]. Tihis is the easiest choice to have a deadlock. Moreover it does not require the use of external signals to control the philosophers, i. Instead of showing all the processes, we concentrate only on a "philosopher" anti a "fork". Both philosophers and forks differ among them only for the indexes that identify used signals and variables.
The dependencies graph for the philosophers problem is shown in Fig. For the sake', of simplicity, we consider two philosophers only. This means that the whole system could enter a circular wait condition, i. More precisely, before the dummy execution which performs the initialization of the variables and signals determining the values that will remain constant in case of a deadlock the condition is necessary. After the first execution, the condition identifying deadlocks is not necessary anymore but is turned into a sufficient condition.
The use of Boolean signals to regulate both the request and the acquisition of a fork imposes a rendezvous-like communication model. C Bolchini, L. By looking at how signals are used we can define four high-level functions: A setRequest on variable v fails if l, is already set. In the same way, a resetRequest on v fails if v is not set.
The identification of these macro-instructions allows us to obtain a graphical representation of the processes, shown in Fig. In the same way, the graph of a fork represents the two alternatives offered by an if statement. In both cases the loop is required by the dynamic semantics of V H D L. These four graphs help us in building: I 12 C Bolchini, L.
As expected, it is not possible to leave the state where each philosopher tries to get the second fork. The dashed line indicates that the whole system is not blocked but it goes on executing in the same state. Another example A simple but significant case of deadlock due to the particular information exchanged among processes is exemplified by the fragment of V H D L code of Fig.
It is a divider taken from . Consider the original model and a slightly changed version: M DIV: VHDL code. A Fig. Modified dependencies graphs. B 10 c Bolchini,L. BaresiI Journalof Systems Architecture44 also the kind of dependency, i.
The solution of these systems would give the values of the exchanged signals for which the model does not enter a deadlock condition. The system can be greatly simplified by studying the opposite problem: There is a deadlock if old and new values are equal, thus a signal can be represented using a single variable, instead of two: The equation does not have any solution, of course, if B J: The results obtained "formally" state that the first model enters a deadlock condition as soon as A 1 Notice that X' stands for the old value of X.
An analysis of VHDL sequential aspects This section introduces a set of static analyses carried out on the V H D L code focusing on the sequential aspects of the language. The aiim of these analyses is to provide the user with information concerning the "future" testability of the circuit resulting from the synthesis of the considered code. When dealing with hardware testing issues, an important information relates to the presence of memory elements in the original circuit, which could be efficiently used for Scan purposes.
The V H D L language allows the explicit declaration of memory elements in the structural style of description allowing an immediate identification of these "test resources".
Yet, when considering a behavioral description, memory elements are often implicitly declared, deferring to a post-synthesis phase the use of such elements. One of the proposed analyses aims at an early detection of such implicit memory elements inferred from the synthesis process by examining the V H D L code.
This approach supplies information concerning the test phase after synthesis and before the circuit is realized. This allows possible modifications in the device specification to improve the testability of the final device, right from its definition. The advantage C. BolchinL L.
Baresi I Journal o f Systems Architecture 44 of dealing with data which is merely transferred rather than manipulated added, incremented,. It takes into account the explicit timing of the V H D L specification to determine the constraints that will need to be fulfilled to actually apply test patterns and access the generated results when dealing with the modules part of a more complex system. All these analyses provide the user with additional information concerning the circuit resulting from the synthesis process, so that possible improvements may be introduced from the testability point of view, which altogether relates to the quality of the specified device.
These analyses are all based on static analysis techniques that, even if not as powerful as dynamic analysis, offer valuable results and are easier to apply. All the techniques presented in the following sections are based on appropriate annotations on the nodes of a graph.
As already discussed in Section 2, the V H D L code is translated into a graph-like representation, called flow graph. The following informal rules for constructing a flow graph can be listed.
Notice that, for readers familiar with the L E D A tool , the representation proposed here is very similar to the graphs built by the tool. The obtained graph is then decorated with the information needed for the particular analysis.
Implicit m e m o r y elements This section sketches a way to find out implicit memory elements based on pattern searching in regular expressions. For each variable, we define a regular expression summing up the significant actions done on the variable itself. Notice that, in this case, loops in flow graphs are not a problem. According to , given a V H D L process, a variable requires an implicit memory element each time: It should be clear now, that looking for implicit memory elements corresponds to looking for strings within regular expressions.
The first two conditions above are easily translated by strings ra and a w. The third case means looking for a but it applies to clocked processes only. Finally, the last rule states that, looking at possible alternatives, if one is an assignment, then all the alternatives must be assignments. Hence, the alternatives can be actually reduced to a single possibility. It models a counter by defining a process with a clock signal and a reset, synchronized by means of a sensitivity list.
Hence no memory element will be used. In this case the detection of inferred memory elements is not so trivial. IN bit; sel: When dealing with vectors of data it is thus necessary either to "explode" the statement,;, as depicted in the right flow graph, or to independently characterize each element of the vector with respect to the regular expressions Fig.
Due to the nature of the analysis, it mu,;t be applied on single processes only. The result of the analysis identifies the presence of memory elements. The information can be used either to declare explicitly the register by rewriting the component specification in another style e.
In particular, given an input signal, its value is delivered on the outputs following some criteria. If dealing with registers, a delay is introduced and the input value is set on the outputs in a successive clock cycle with respect to when the input is read.
In case multiplexers, demultiplexers, etc. If a variable is transferred by a process, it can be used to propagate its test patterns through the process itself. Being able to statically identify which variables can be propagated through which processes provides more control on test patterns and thus is useful in testing hardware circuits.
Once more, let us consider the flow graph. Each node is associated with a set V of variables. All those variables for which the given definition of "transferred variables" does not hold anymore is due to the statement in the node. Moreover, we define another set TV Transferred Variables which contains the variables still transferred after each step. At the beginning, TV contains all the variables of the process. After this, visiting each flow graph node, variables in V are subtracted from TV.
At the end, i. In this case, we can extend the flow graph to cope with a set of related processes. Recall the counter process of Fig. A node corresponds to a whole process. Its set V is simply the difference between all the variables and the set TV of the invoked process. Let us consider different interacting processes represented by their synthesized module in Fig.
It is significant to be able to characterize 15 C Bolchini, L. Processes modules interconnection and data transfer analysis. Timing analysis: For example, by analyzing the process describing the Mul t i p l e x e r, variables A and B are transferred to D.
The same happens when analyzing the process defining the R e g i s t e r ; variable D is transferred to E. As a consequence, variables A and B are transferred to E. On the other hand, variables A, B and C are not transferred to F.
This analysis helps the user in managing test pattern generation when the G e n e r i c M o d u l e test set is considered, knowing that it can easily control values on E by acting directly on A and B, whereas determining the value of F is a more complex task. Timing When considering the possibility of applying the desired input patterns to a module embedded in a complex design, it is necessary not only to verify whether there is a direct path to the inputs under examinations, but also the timing constraints that are imposed by the upstream modules.
Consider, as an example, the circuit depicted in Fig. To be able to apply any desired pattern to inputs E and F from the primary inputs g and B it is necessary to take into account that any value provided to P1 will be set to E after a delay of T1, whereas values on P2 will be available on input F after delay T2.
This information may ease the test generation phase and may uncover possible problems of correlation in controllability and observability and synchrony during circuit testing . In fact, it is statically possible to decide whether all the combinations of the possible values are observable on process inputs.
Differen't delays could actually forbid some combinations. An analysis that can be carried out on the flow graph of a V H D L process concerns the delays associated with variables, i. Parametric values can be associated with arithmetic and logic operations to evaluate the delays through the flow graph.
Furthermore, labels may be also used for clocked assignments which require a time equal to a clock cycle to provide the correct final value of assignments.
Before proposing an informal algorithm to evaluate the actual delays, we have to give the definition of a path. Reply Bhaumik Desai October 22, at 6: This will be really appreciated. Reply Sharath Kulal October 24, at I'm new from this field can anyone send overall view to design the project. Reply Enter your comment Comment as: Powered by Blogger. Related Papers. By Fadi Fadi. By harish SV. By Erick Cuevas. By Carlos LM. By Siraj Munir.
Download pdf. Remember me on this computer. Enter the email address you signed up with and we'll email you a reset link.
Need an account? Click here to sign up. Help Center Find new research papers in: