Design Problem 4 Solution

Size: px
Start display at page:

Download "Design Problem 4 Solution"

Transcription

1 CSE 260 Digital Computers: Organization and Logical Design Design Problem 4 Solution Jon Turner Due 4/13/06 1. (125 points). In this problem, you will design a packet FIFO, which is a circuit that temporarily stores variable length packets of information. Your circuit will have two interfaces. The left interface includes a four bit data input called din, a single bit input, called sopin (sop stands for start-of-packet) and two single bit outputs, ack (which stands for acknowledgement) and errsig (which indicates an error has occorred). The right interface will have a four bit data output called dout, one single bit output, sopout and a single bit input called ok2send. Packets are sent to the left interface on the din input. The sopin input is high during the clock tick when the first word of a packet is input. The value of the first word specifies the total number of words in the packet; this number must be at least three and no more than six. On receiving the first word of a new packet, your circuit should make sure that there is enough space available to store the entire packet. If there is, then the ack input should be high during the clock edge when the second word of the packet is received. If the packet will not fit in the available space, your circuit should not attempt to store it in memory and should not raise the ack signal. Your circuit should enter an error state if the length specified in the first word of a packet is out of range. When it is in the error state, the errsig output should go high, and it should remain high until the circuit is reset. The interface does not need to handle back-to-back packets. There should be one idle clock tick between receiving the last word of one packet and the first word of the next. Whenever the circuit contains at least one complete packet, the right interface should send a packet out using the dout output, if the ok2send input is high. The sopout output should be asserted as the first word of the packet is sent out. Once the circuit starts to send a packet out, it should continue until all words of the packet have been sent, even if ok2send drops after the first word goes out. Your circuit should be called pfifo and should include a memory called pstore with space to store a total of 16 words. Your circuit should also include two counters nwords which gives the number of words in the memory that are currently occupied by packets, and npkts, which gives the number of packets that have been completely received and have not yet been completely sent out. Your circuit may also include other registers. In addition to the signals mentioned above, your circuit will also have a synchronous reset input. When the reset input is asserted, any stored data is discarded and the inputs are ignored until reset goes low. Your design notes should include a detailed description of the function of what the circuit does (essentially a paraphrasing of the description given above, in your own words) and two timing diagrams, one for the left interface and one for the right interface. The - 1 -

2 timing diagram for the left interface should show a typical packet arrival. The timing diagram for the right interface should show a typical packet departure. Your design notes should also include a block diagram of your circuit showing all the major components (such as the memory, the registers and the controllers for the left and right interfaces) all the input and output signals and the major signals that go between the components. Your notes should include a state transition diagram for each of the two controllers. Finally, your design notes should include a description of your testing strategy. Implement your design using VHDL and turn in a printed copy. Your VHDL should be carefully documented so that it is self-contained and easy for a reader to understand. To synthesize this circuit, you will need to turn off the default synthesis option for RAM extraction. To do this, right click on Synthesize in the Process window of Project Navigator and select Properties. In the HDL Options tab, turn off the check box for RAM Extraction. Using your block diagram and your VHDL, estimate the resources that your circuit will require (number of flip flops and LUTs). Compare your estimates to the numbers reported in the synthesis report. Look at the sections of the synthesis report labeled HDL Synthesis and Macro Statistics, to help you with this. To get a better understanding of the resource usage, try re-synthesizing your circuit, optimizing for area, instead of speed (access the synthesis options by right-clicking on synthesize in the Process window of Project Navigator). Also, try changing the word-size of your circuit from 4 bits to 8 bits or 16 bits, to see how this affects the overall LUT count. Perform a functional simulation that demonstrates that your circuit works correctly (be thorough) and turn in your printout. Your simulation should be based on the testing strategy outlined in your design notes. Format your simulation output to make it easy for another person to verify that your circuit works correctly. Format counter values and data values using hexadecimal rather than binary. Group related signals together in some logical fashion. Show values of all your internal registers and the states of your state machines. Show the values stored in pstore. Add annotations to the simulation output, pointing out the different parts of the test and be sure to verify that the circuit works correctly. Perform a timing simulation of your circuit and turn in your printout. Choose the clock period for your timing simulation based on the timing information you get from the synthesis report. Your clock period will need to be at least as large as the estimated period given in the synthesis report. It should also be at least as large as the input arrival time given in the synthesis report. To set the clock period for your simulation, right click in the Testbench Waveform tool and select Re-scale timing. Change the clock period in the dialog box that comes up. You should also change the Input Setup Time to be at least equal to the input arrival time specified by the synthesis report. Set the field called Output Valid Delay so that the sum of this and the Input Setup Time is smaller than the clock period (the tool requires this, but it has no direct impact on your simulation). In order for your timing simulation to work correctly, you will need to make the reset period at the start of your simulation last for at least 100 ns. It s a good idea to use this long reset period in your functional simulation as well. That way, you can use the same testbench waveform file for both simulations. Make sure that the timing simulation output is consistent with your functional simulation. You won t be able to see all the internal signals in your timing simulation, but you should be able to observe the register values and be able to verify that the outputs are - 2 -

3 correct. If the timing simulation does not work, try increasing the clock period until you find a clock period for which it does work correctly. Turn in a printout showing that it does work correctly and report what clock period you used. Also use the timing simulation to measure the delays from when the clock changes to when the internal registers in your circuit change. Also measure the time from when the clock changes to when the acknowledgement and dout signals change. Compare the values measured from your simulation to the corresponding values in the synthesis report. Add extra cursors to your ModelSim waveform display when making these measurements. Turn in the portion of your simulation output showing these measurements and highlight them on your printout. Send a copy of your VHDL source file to jon.turner@wustl.edu. Please name your attachment dp4-yourname.vhd where yourname is your first and last names (e.g. jonturner)

4 Packet Fifo Design Notes. Description. The packet FIFO stores variable length packets of information. It has two interfaces. The left interface includes a four bit data input called din, a single bit input, called sopin (sop stands for start-of-packet) and two single bit outputs, ack (which stands for acknowledgement) and errsig (which indicates an error has occorred). The right interface will have a four bit data output called dout, one single bit output, sopout and a single bit input called ok2send. Packets are sent to the left interface on the din input. The sopin input is high during the clock tick when the first word of a packet is received. The value of the first word specifies the total number of words in the packet; this number must be at least three and no more than six. On receiving the first word of a new packet, the circuit checks that there is enough space available to store the entire packet. If there is, then the ack input is raised high before the clock edge on which the second word of the packet is received. If the packet will not fit in the available space, the circuit does not attempt to store it in memory and does not raise the ack signal. The circuit enters an error state if the length specified in the first word of a packet is out of range. When it is in the error state, the errsig output goes high, and remains high until the circuit is reset. The interface does not handle back-to-back packets. There must be one idle clock tick between receiving the last word of one packet and the first word of the next. Whenever the circuit contains at least one complete packet, the right interface sends a packet out using the dout output, if the ok2send input is high. The sopout output should be asserted as the first word of the packet is sent out. Once the circuit starts to send a packet out, it should continue until all words of the packet have been sent, even if ok2send drops after the first word goes out

5 Timing Diagrams. The timing diagrams below show a typical packet arrival on the left interface and a departure on the right interface. left interface clk sopin din ack 00 x04 x01 x02 x03 00 right interface clk ok2send sopout din x04 x01 x02 x

6 Block Diagram. The block diagram of the circuit is shown below. The data path consists of the pstore block and the demultiplexor preceding it and multiplexor following it. The input demultiplexor must do two things. First, it must steer the arriving data bits to the correct word of pstore. Second, it must generate a Load signal for each of the 16 words. Both functions can be implemented with a decoder that decodes the value of wpntr and has an output enable. The control part of the circuit has a total of six registers. InCnt is a down counter used to keep track of how many words are left to receive in the incoming packet. It is initialized from the value of din during the clock tick when the first word of the packet arrives. OutCnt serves a similar function on the output side. The registers wpntr and rpntr are pointers to the locations in pstore where the next word is to be written or read, respectively. The registers npkts and nwords keep track of the number of complete packets in pstore and the number of words used in pstore. NPkts is incremented when the last word of a packet is received and decremented when the last word is sent out. The two state machines ctlleft and ctlright handle the input and output interfaces respectively. CtlLeft includes an error state, which it enters if a packet is received with an incorrect length. The state machines each have exclusive control over two registers and they share the control of npkts and nwords. Because npkts and nwords can be incremented by ctlleft and decremented by ctlright, they must be handled separately. The two state machines provide output signals to increment and decrement them. These are treated as inputs by the registers, which do not change values whenever both of their control inputs are asserted at the same time. din 4 pstore 16x4 4 dout incnt wpntr rpntr outcnt LD LD -1 sopin ack error ctlleft idle busy errstate +1 npkts nwords -1 ctlright idle busy sopout ok2send - 6 -

7 State Transition Diagrams. The state diagrams for the two controllers are shown below. These are high level state diagrams with conditions and actions labeling the edges, rather than explicit inputs and outputs. ctlleft idle condition: sopin=1 and (din<3 or din>6) action: none condition: condition: incnt=1 sopin=1 and 3<=dIn<=6 and action: nwords+din<=16 increment nwords action: increment wpntr load incnt=din-1 increment npkts increment nwords increment wpntr write to pstore busy condition: action: incnt>1 decrement incnt increment nwords increment wpntr write to pstore errstate ctlright condition: outcnt=1 action: decrement nwords increment rpntr decrement npkts idle condition: ok2send=1 and npkts>0 action: load outcnt=dout busy condition: action: outcnt>1 decrement outcnt decrement nwords increment rpntr - 7 -

8 Testing Strategy. Before devising a specific testing strategy, we first list the features of the three state machines that we need to check. For the left interface controller, we need to verify the following. - Interface accepts packets for which the size is in range and there is room in pstore and stores them in pstore correctly. - Acknowledgements are produced for packets that should be accepted and at the right time. - Interface does not accept a packet for which the pstore does not have room. - When pstore drains sufficiently to make room for a waiting packet, pstore accepts the packet. - Interface rejects packets for which the size is out of range and goes into the error state. - Reset forces controller into its initial state and clears registers appropriately. For the right interface controller, we need to verify the following. - Interface sends packets out correctly when there is a complete packet and the ok2send input is asserted. This includes generating the sopout signal at the appropriate time. - Interface waits to send packet if ok2send is not asserted. - Interface does not attempt to send packets when there is no valid packet present. - Reset forces controller into its initial state and clears registers appropriately. For the controller that handles the two shared registers (nwords, npkts), we need to verify that they are incremented and decremented appropriately. In particular, we should test the case when there are simultaneous increment/decrement signals to these registers, meaning that their values should remain unchanged. And we also need to verify that reset puts them back in the initial state. To test all of these features, the test starts with ok2send low, allowing pstore to fill up with packets. We then attempt to add another packet, in order to check that leftctl refuses to accept it. We then raise ok2send, allowing packets to drain out. This also allows us to check that the waiting packet enters as soon as pstore has room for it. We then start a new packet in, timing its arrival so that it finishes at the same time as an outgoing packet. This allows us to verify that npkts does not change in the case where there are simultaneous increment/decrement signals present. The last phase of the test attempts to send two packets whose sizes are out of range. This allows us to verify that we enter errstate and raise errsig, and that the reset re-initializes everything

9 VHDL. library IEEE; use IEEE.STD_LOGIC_1164.ALL; use IEEE.STD_LOGIC_ARITH.ALL; use IEEE.STD_LOGIC_UNSIGNED.ALL; -- Packet FIFO -- Jon Turner - 3/23/ The packet FIFO stores variable length "packets" of information. -- It has two interfaces. The "left" interface handles incoming packets -- The "right" interface handles outgoing packets The design uses a separate controller for each interface, and -- stores packets in a bank of registers called pstore. -- It maintains six separate counters, which are detailed below. entity pfifo is port( clk, reset: in std_logic; -- left interface din: in std_logic_vector(3 downto 0); sopin: in std_logic; ack: out std_logic; errsig: out std_logic; -- data input -- start of packet -- acknowledgement -- indicates packet length error -- right interface dout: out std_logic_vector(3 downto 0); -- data output sopout: out std_logic; -- start of packet ok2send: in std_logic -- allows sending of packets ); end pfifo; architecture arch1 of pfifo is constant wsiz : integer := 4; constant pssiz : integer := 16; constant lgpssiz : integer := 4; constant lgnpkts: integer := 3; -- word size -- # of words in packet store -- # of bits to represent pssize-1 -- # of bits to represent npkts -- number of words left to arrive/leave signal incnt: std_logic_vector(wsiz-1 downto 0); signal outcnt: std_logic_vector(wsiz-1 downto 0); -- pointer to next word to write/read signal wpntr: std_logic_vector(lgpssiz-1 downto 0); signal rpntr: std_logic_vector(lgpssiz-1 downto 0); -- number of words/packets stored signal nwords: std_logic_vector(lgpssiz-1 downto 0); signal npkts: std_logic_vector(lgnpkts-1 downto 0); -- Packet store type pstoretype is array(0 to pssiz-1) of std_logic_vector(wsiz-1 downto 0); signal pstore: pstoretype; -- state machines controlling input and output type leftctltype is (idle, busy, errstate); signal leftctl: leftctltype; type rightctltype is (idle, busy); signal rightctl: rightctltype; -- auxiliary signals signal inrange: std_logic; signal validarrival: std_logic; signal enoughroom: std_logic; -- asserted when din is a valid packet length -- asserted when packet arrival starts -- asserted enough room for arriving packet - 9 -

10 signal nwordsplus: std_logic; signal nwordsminus: std_logic; signal npktsplus: std_logic; signal npktsminus: std_logic; -- asserted when nwords should be incremented -- asserted when nwords should be decremented -- asserted when npkts should be incremented -- asserted when npkts should be decremented -- more concise type conversion function function int(d: std_logic_vector) return integer is begin return conv_integer(unsigned(d)); end function int; begin inrange <= '1' when din >= x"3" and din <= x"6" else '0'; enoughroom <= '1' when (('0' & din) + ('0' & nwords)) <= pssiz else '0'; validarrival <= '1' when leftctl = idle and sopin = '1' and inrange = '1' and enoughroom = '1' else '0'; -- process for left controller process (clk) begin if clk'event and clk = '1' then ack <= '0'; if reset = '1' then leftctl <= idle; incnt <= (incnt'range => '0'); wpntr <= (wpntr'range => '0'); else if leftctl = idle then if validarrival = '1' then pstore(int(wpntr)) <= din; incnt <= din - 1; wpntr <= wpntr + 1; ack <= '1'; leftctl <= busy; elsif sopin = '1' and inrange = '0' then leftctl <= errstate; elsif leftctl = busy then pstore(int(wpntr)) <= din; incnt <= incnt - 1; wpntr <= wpntr + 1; if incnt = 1 then leftctl <= idle; end process; -- outputs of left controller npktsplus <= '1' when leftctl = busy and incnt = 1 else '0'; nwordsplus <= '1' when leftctl = busy or validarrival = '1' else '0'; errsig <= '1' when leftctl = errstate else '0'; -- process for updating nwords and npkts process(clk) begin if clk'event and clk = '1' then if reset = '1' then nwords <= (nwords'range => '0'); npkts <= (npkts'range => '0'); else if nwordsplus > nwordsminus then nwords <= nwords + 1; elsif nwordsplus < nwordsminus then nwords <= nwords - 1; if npktsplus > npktsminus then npkts <= npkts + 1; elsif npktsplus < npktsminus then

11 npkts <= npkts - 1; end process; -- process for right controller process (clk) begin if clk'event and clk = '1' then sopout <= '0'; if reset = '1' then rightctl <= idle; outcnt <= (outcnt'range => '0'); rpntr <= (rpntr'range => '0'); else if rightctl = idle then if ok2send = '1' and npkts > 0 then outcnt <= pstore(int(rpntr)); rightctl <= busy; sopout <= '1'; elsif rightctl = busy then outcnt <= outcnt - 1; rpntr <= rpntr + 1; if outcnt = 1 then rightctl <= idle; end process; -- outputs of right controller npktsminus <= '1' when rightctl = busy and outcnt = 1 else '0'; nwordsminus <= '1' when rightctl /= idle else '0'; dout <= pstore(int(rpntr)); end arch1;

12 Implementation Complexity. The relevant section of the simulation report is shown below. Notes have been added below in bold and certain parts of the output have also been highlighted to call attention to certain points. ========================================================================= * HDL Synthesis * ========================================================================= Synthesizing Unit <pfifo>. Related source file is C:/260designs/sequential/vhdlNZ/pFIFO/pFIFO.vhd. Found finite state machine <FSM_0> for signal <leftctl> States 3 Transitions 7 Inputs 4 Outputs 3 Clock clk (rising_edge) Reset reset (positive) Reset type synchronous Reset State idle Power Up State idle Encoding automatic Implementation LUT Found 1-bit register for signal <ack>. Found 4-bit 16-to-1 multiplexer for signal <dout>. Found 1-bit register for signal <sopout>. Found 4-bit subtractor for signal <$n0028> created at line 91. Found 4-bit comparator greater for signal <$n0059> created at line 74. Found 6-bit comparator lessequal for signal <$n0081> created at line 75. Found 4-bit comparator greatequal for signal <$n0082> created at line 73. Found 4-bit comparator lessequal for signal <$n0083> created at line 73. Found 4-bit adder carry out for signal <$n0084> created at line 75. Found 4-bit down counter for signal <incnt>. Found 3-bit updown counter for signal <npkts>. Found 4-bit updown counter for signal <nwords>. Found 4-bit down counter for signal <outcnt>. Found 64-bit register for signal <pstore>. Found 1-bit register for signal <rightctl<0>>. Found 4-bit up counter for signal <rpntr>. Found 4-bit up counter for signal <wpntr>. Registers have been highlighted above. Adding up the sizes gives a total of 90 flip flops. This does not include the flip flops for the finite state machine, which will use 2 or 3. The low level report below lists 95 flip flops, so the reported number is within 2 or 3 of what we would expect from the numbers above, or from an inspection of the VHDL source code. Summary: inferred 1 Finite State Machine(s). inferred 6 Counter(s). inferred 67 D-type flip-flop(s). inferred 2 Adder/Subtracter(s). inferred 4 Comparator(s). inferred 4 Multiplexer(s). Unit <pfifo> synthesized. ========================================================================= * Advanced HDL Synthesis * ========================================================================= Advanced RAM inference... Advanced multiplier inference

13 Advanced Registered AddSub inference... Selecting encoding for FSM_0... Optimizing FSM <FSM_0> on signal <leftctl> with one-hot encoding. Dynamic shift register inference... ========================================================================= HDL Synthesis Report Macro Statistics # FSMs : 1 # Adders/Subtractors : 2 4-bit adder carry out : 1 estimate 8 LUTs 4-bit subtractor : 1 8 LUTs # Counters : 6 3-bit updown counter : 1 npkts (3 FFs + 6 LUTs) 4-bit updown counter : 1 nwords (4 FFs + 8 LUTs) 4-bit down counter : 2 incnt, outcnt (8 FFs + 8 LUTs) 4-bit up counter : 2 rpntr, wpntr (8 FFs + 8 LUTs) # Registers : 22 4-bit register : 16 pstore (64 FFs) 1-bit register : 6 state machines, sopout, ack (6 FFs) # Comparators : 4 4-bit comparator lessequal : LUTs per bit 4-bit comparator greatequal : 1 8 LUTs 6-bit comparator lessequal : 1 12 LUTs 4-bit comparator greater : 1 8 LUTs # Multiplexers : 1 4-bit 16-to-1 multiplexer : 1 for pstore output (60 LUTs) Combining the estimates above gives 93 FFs LUTs. The FF count is very close to the 95 reported below and the two replicated FFs mentioned just below account for the difference. The LUT count is less than half the total of 329, so there are clearly LUTs that aren t reported in the Macro Statistics table. We would expect each bit in pstore to require 1 LUT for feeding back the currently stored value, so this adds 64. Some additional LUTs will be used for the input section of pstore to decode the value of wpntr to create the enables for the individual registers that make up pstore. One or two LUTs per word in pstore should be enough for this, so this adds 16 LUTs to 32 LUTs. The next state logic for the state machines would add maybe 2 LUTs per FF input, so that adds 8 LUTs. The sopout and ack outputs might each require another 2 LUTs. Adding these in brings the total number of estimated LUTs to 234 to 250. This is still significantly 100 fewer than the 329 reported below. When the circuit is synthesized to optimize for area rather than speed, the number of LUTs drops to 183. Our estimate of 234 is considerably higher than this, but the fact that our estimate is bracketed by the estimates given by the synthesizer provides some confidence that the synthesizer is at least making reasonable choices in optimizing the circuit. As a further experiment, I re-synthesized the circuit using an 8 bit word and a 16 bit word, optimizing for area. This gave LUT counts of 302 and 533 respectively. Since the increase in the number of words in pstore is 64 and 128 in these two cases, it appears that the number of LUTs per bit of pstore is about 1.8, since we would expect almost all the increase in LUTs in these cases to be directly associated with the bits in pstore. ========================================================================= ========================================================================= * Low Level Synthesis * ========================================================================= Optimizing unit <pfifo>... Loading device for application Xst from file '3s200.nph' in environment C:/Xilinx

14 Mapping all equations... Building and optimizing final netlist... Found area constraint ratio of 100 (+ 5) on block pfifo, actual ratio is 4. FlipFlop leftctl_ffd3 has been replicated 1 time(s) FlipFlop leftctl_ffd2 has been replicated 1 time(s) Replicated flip flops added to improve performance (by reducing fanout of flip flop outputs). These add to total flip flop count, below. ========================================================================= * Final Report * ========================================================================= Final Results RTL Top Level Output File Name : pfifo.ngr Top Level Output File Name : pfifo Output Format : NGC Optimization Goal : Speed Keep Hierarchy : NO Design Statistics # IOs : 15 Macro Statistics : # Registers : 25 # 1-bit register : 3 # 3-bit register : 6 # 4-bit register : 16 # Multiplexers : 1 # 4-bit 16-to-1 multiplexer : 1 # Adders/Subtractors : 1 # 4-bit adder carry out : 1 # Comparators : 4 # 4-bit comparator greatequal : 1 # 4-bit comparator greater : 1 # 4-bit comparator lessequal : 1 # 6-bit comparator lessequal : 1 # Xors : 12 # 1-bit xor3 : 12 Cell Usage : # BELS : 368 # GND : 1 # LUT1 : 5 # LUT2 : 13 # LUT2_D : 1 # LUT2_L : 3 # LUT3 : 54 # LUT3_D : 1 # LUT3_L : 62 # LUT4 : 112 # LUT4_D : 6 # LUT4_L : 72 # MUXCY : 4 # MUXF5 : 18 # MUXF6 : 8 # MUXF7 : 4 # VCC : 1 # XORCY : 3 # FlipFlops/Latches : 95 # FDE : 64 # FDR : 4 # FDRE : 24 # FDRS : 1 # FDS : 2 # Clock Buffers : 1 # BUFGP : 1 # IO Buffers :

15 # IBUF : 7 # OBUF : 7 ========================================================================= Device utilization summary: Selected Device : 3s200ft256-5 Number of Slices: 176 out of % Number of Slice Flip Flops: 95 out of % Number of 4 input LUTs: 329 out of % Number of bonded IOBs: 14 out of 173 8% Number of GCLKs: 1 out of 8 12%

16 Functional Simulation. The first section of the simulation is shown below. Ok2send is held low during this part so that packets fill pstore, as can be seen at the bottom of the figure. The callouts point out the main items of significance. Arrivals with proper packet sizes. Expected state changes. incnt and wpntr working correctly nwords and npkts working correctly correct data stored in pstore

17 This next part shows that packets are not accepted until there is room for them and that npkts is not modified when an arrival and departure complete at the same time. Packet blocked at input until room, then accepted. No change to npkts on simultaneous arrival, departure Outgoing packets New data replacing old in pstore

18 The final part of the simulation shows the transitions to and from the error state. Wrong packet lengths trigger transition to errstate and raise errsig. Reset restores initial state

19 Timing Simulation. The synthesis report claims that the circuit will run with a clock period of 7 ns (see below), but it also reports that inputs can take over 8.5 ns to get from input pads to flip flops. With this in mind, I simulated the circuit with a clock period of 12 ns and allowed 9 ns for signals to propagate from input pads to the internal flip flops. The circuit worked correctly at this clock rate. The first panel below shows the start of the simulation run that was used for the functional Packets received Packets forwarded 3.2 ns clk to change in nwords, npkts 8.5 ns clk to change in ack 10.8 ns clk to change in dout

20 simulation. The second panel shows additional detail. From this detailed view, we can see that nwords and npkts change 3.2 ns after the clock. The ack output changes 8.5 ns after the clock and the dout output changes 10.8 ns after the clock. It makes sense that nwords and npkts have a very short delay, since these are internal signals. Ack and dout are both external signals. We would expect dout to have longer delay since changes to dout must ripple through an output multiplexor used to select one word of the 16 in pstore. There are fewer stages of logic needed to produce the Ack signal. The delays in the simulation differ somewhat from the delays mentioned in the synthesis report. In particular, the detailed timing section of the synthesis report shows that the delay from clock to Q for the internal flip flops is 1.4 ns, whereas the simulation shows a delay of 3.2 ns. The delay measured for dout(10.8 ns) is also somewhat larger than the number that appears in the synthesis report (8 ns). These differences result from the fact that the synthesis report is based on estimates for a circuit that has not been mapped onto the actual chip. The simulation report, on the other hand, is based on the actual mapping of the circuit onto the chip and has more accurate delay information

21 Timing section of synthesis report. Timing Summary: Speed Grade: -5 Minimum period: 6.990ns (Maximum Frequency: MHz) Minimum input arrival time before clock: 8.539ns Maximum output required time after clock: 8.045ns Maximum combinational path delay: No path found Timing Detail: All values displayed in nanoseconds (ns) Timing constraint: Default period analysis for Clock 'clk' Delay: 6.990ns (Levels of Logic = 7) Source: nwords_0 (FF) Destination: nwords_3 (FF) Source Clock: clk rising Destination Clock: clk rising Data Path: nwords_0 to nwords_3 Gate Net Cell:in->out fanout Delay Delay Logical Name (Net Name) FDRE:C->Q nwords_0 (nwords_0) LUT2_D:I1->LO pfifo n0149<0>lut (N6935) MUXCY:S->O pfifo n0149<0>cy (pfifo n0149<0>_cyo) MUXCY:CI->O pfifo n0149<1>cy (pfifo n0149<1>_cyo) MUXCY:CI->O pfifo n0149<2>cy (pfifo n0149<2>_cyo) XORCY:CI->O pfifo n0149<3>_xor (_n0149<3>) LUT4_D:I3->O _n (CHOICE138) LUT4:I0->O _n01231 (_n0123) FDRE:CE nwords_ Total 6.990ns (3.919ns logic, 3.071ns route) (56.1% logic, 43.9% route) Timing constraint: Default OFFSET IN BEFORE for Clock 'clk' Offset: 8.539ns (Levels of Logic = 8) Source: din<0> (PAD) Destination: nwords_3 (FF) Destination Clock: clk rising Data Path: din<0> to nwords_3 Gate Net Cell:in->out fanout Delay Delay Logical Name (Net Name) IBUF:I->O din_0_ibuf (din_0_ibuf) LUT2_D:I0->LO pfifo n0149<0>lut (N6935) MUXCY:S->O pfifo n0149<0>cy (pfifo n0149<0>_cyo) MUXCY:CI->O pfifo n0149<1>cy (pfifo n0149<1>_cyo) MUXCY:CI->O pfifo n0149<2>cy (pfifo n0149<2>_cyo) XORCY:CI->O pfifo n0149<3>_xor (_n0149<3>) LUT4_D:I3->O _n (CHOICE138) LUT4:I0->O _n01231 (_n0123) FDRE:CE nwords_ Total 8.539ns (4.972ns logic, 3.567ns route) (58.2% logic, 41.8% route) Timing constraint: Default OFFSET OUT AFTER for Clock 'clk' Offset: 8.045ns (Levels of Logic = 5) Source: rpntr_0 (FF) Destination: dout<3> (PAD) Source Clock: clk rising Data Path: rpntr_0 to dout<3> Gate Net Cell:in->out fanout Delay Delay Logical Name (Net Name)

22 FDRE:C->Q rpntr_0 (rpntr_0) LUT3:I0->O Mmux_dOut_inst_lut3_81 (Mmux_dOut net15) MUXF5:I0->O Mmux_dOut_inst_mux_f5_4 (Mmux_dOut net17) MUXF6:I0->O Mmux_dOut_inst_mux_f6_2 (Mmux_dOut net21) MUXF7:I0->O Mmux_dOut_inst_mux_f7_1 (dout_1_obuf) OBUF:I->O dout_1_obuf (dout<1>) Total 8.045ns (6.255ns logic, 1.790ns route) (77.7% logic, 22.3% route)

Design Problem 5 Solution

Design Problem 5 Solution CSE 260 Digital Computers: Organization and Logical Design Design Problem 5 Solution Jon Turner Due 5/3/05 1. (150 points) In this problem, you are to extend the design of the basic processor to implement

More information

Design Problem 3 Solutions

Design Problem 3 Solutions CSE 260 Digital Computers: Organization and Logical Design Jon Turner Design Problem 3 Solutions In this problem, you are to design, simulate and implement a sequential pattern spotter, using VHDL. This

More information

Asynchronous FIFO Design

Asynchronous FIFO Design Asynchronous FIFO Design 2.1 Introduction: An Asynchronous FIFO Design refers to a FIFO Design where in the data values are written to the FIFO memory from one clock domain and the data values are read

More information

Problem Set 10 Solutions

Problem Set 10 Solutions CSE 260 Digital Computers: Organization and Logical Design Problem Set 10 Solutions Jon Turner thru 6.20 1. The diagram below shows a memory array containing 32 words of 2 bits each. Label each memory

More information

Control and Datapath 8

Control and Datapath 8 Control and Datapath 8 Engineering attempts to develop design methods that break a problem up into separate steps to simplify the design and increase the likelihood of a correct solution. Digital system

More information

PROJECT REPORT - UART

PROJECT REPORT - UART Tanvi Shama 200601196 Akshay Soni 200601148 DAIICT PROJECT REPORT - UART Digital System Architecture 2 Project Report - UART S.No Topic Page No. 1. PROJECT STATEMENT 3 2. FUNCTIONAL SPECIFICATIONS INTRODUCTION

More information

Lecture 12 VHDL Synthesis

Lecture 12 VHDL Synthesis CPE 487: Digital System Design Spring 2018 Lecture 12 VHDL Synthesis Bryan Ackland Department of Electrical and Computer Engineering Stevens Institute of Technology Hoboken, NJ 07030 1 What is Synthesis?

More information

Field Programmable Gate Array

Field Programmable Gate Array Field Programmable Gate Array System Arch 27 (Fire Tom Wada) What is FPGA? System Arch 27 (Fire Tom Wada) 2 FPGA Programmable (= reconfigurable) Digital System Component Basic components Combinational

More information

FSM Components. FSM Description. HDL Coding Methods. Chapter 7: HDL Coding Techniques

FSM Components. FSM Description. HDL Coding Methods. Chapter 7: HDL Coding Techniques FSM Components XST features: Specific inference capabilities for synchronous Finite State Machine (FSM) components. Built-in FSM encoding strategies to accommodate your optimization goals. You may also

More information

CCE 3202 Advanced Digital System Design

CCE 3202 Advanced Digital System Design CCE 3202 Advanced Digital System Design Lab Exercise #2 This lab exercise will show you how to create, synthesize, and test a 3-bit ripple counter. A ripple counter is simply a circuit that outputs the

More information

ECE 4514 Digital Design II. Spring Lecture 15: FSM-based Control

ECE 4514 Digital Design II. Spring Lecture 15: FSM-based Control ECE 4514 Digital Design II Lecture 15: FSM-based Control A Design Lecture Overview Finite State Machines Verilog Mapping: one, two, three always blocks State Encoding User-defined or tool-defined State

More information

VHDL HIERARCHICAL MODELING

VHDL HIERARCHICAL MODELING To incorporate hierarchy in VHDL we must add component declarations and component instantiations to the model. In addition, we need to declare internal signals to interconnect the components. We can also

More information

Part 4: VHDL for sequential circuits. Introduction to Modeling and Verification of Digital Systems. Memory elements. Sequential circuits

Part 4: VHDL for sequential circuits. Introduction to Modeling and Verification of Digital Systems. Memory elements. Sequential circuits M1 Informatique / MOSIG Introduction to Modeling and erification of Digital Systems Part 4: HDL for sequential circuits Laurence PIERRE http://users-tima.imag.fr/amfors/lpierre/m1arc 2017/2018 81 Sequential

More information

HDL Coding Style Xilinx, Inc. All Rights Reserved

HDL Coding Style Xilinx, Inc. All Rights Reserved HDL Coding Style Objective After completing this module, you will be able to: Select a proper coding style to create efficient FPGA designs Specify Xilinx resources that need to be instantiated for various

More information

CSE 260 Introduction to Digital Logic and Computer Design. Exam 1. Your name 2/13/2014

CSE 260 Introduction to Digital Logic and Computer Design. Exam 1. Your name 2/13/2014 CSE 260 Introduction to Digital Logic and Computer Design Jonathan Turner Exam 1 Your name 2/13/2014 1. (10 points) Draw a logic diagram that implements the expression A(B+C)(C +D)(B+D ) directly (do not

More information

Table of Contents TABLE OF CONTENTS...2

Table of Contents TABLE OF CONTENTS...2 AUDIO COMPRESSION Table of Contents TABLE OF CONTENTS...2 OVERVIEW...3 1.1 PROJECT GOALS...3 1.2 DESIGN REQUIREMENTS... 3 1.3 THEORY... 3 1.4 SYSTEM OVERVIEW... 6 1.5 BLOCKS OVERVIEW... 8 2.1 Vhdl codes

More information

Contents. Chapter 9 Datapaths Page 1 of 28

Contents. Chapter 9 Datapaths Page 1 of 28 Chapter 9 Datapaths Page of 2 Contents Contents... 9 Datapaths... 2 9. General Datapath... 3 9.2 Using a General Datapath... 5 9.3 Timing Issues... 7 9.4 A More Complex General Datapath... 9 9.5 VHDL for

More information

Timing in synchronous systems

Timing in synchronous systems BO 1 esign of sequential logic Outline Timing in synchronous networks Synchronous processes in VHL VHL-code that introduces latches andf flip-flops Initialization of registers Mealy- and Moore machines

More information

Schedule. ECE U530 Digital Hardware Synthesis. Rest of Semester. Midterm Question 1a

Schedule. ECE U530 Digital Hardware Synthesis. Rest of Semester. Midterm Question 1a ECE U530 Digital Hardware Synthesis Prof. Miriam Leeser mel@coe.neu.edu November 8, 2006 Midterm Average: 70 Lecture 16: Midterm Solutions Homework 6: Calculator Handshaking HW 6: Due Wednesday, November

More information

CS/EE Homework 7 Solutions

CS/EE Homework 7 Solutions CS/EE 260 - Homework 7 Solutions 4/2/2001 1. (20 points) A 4 bit twisted ring counter is a sequential circuit which produces the following sequence of output values: 0000, 1000, 1100, 1110, 1111, 0111,

More information

CCE 3202 Advanced Digital System Design

CCE 3202 Advanced Digital System Design CCE 3202 Advanced Digital System Design Lab Exercise #2 Introduction You will use Xilinx Webpack v9.1 to allow the synthesis and creation of VHDLbased designs. This lab will outline the steps necessary

More information

Assignment. Last time. Last time. ECE 4514 Digital Design II. Back to the big picture. Back to the big picture

Assignment. Last time. Last time. ECE 4514 Digital Design II. Back to the big picture. Back to the big picture Assignment Last time Project 4: Using synthesis tools Synplify Pro and Webpack Due 11/11 ning of class Generics Used to parameterize models E.g., Delay, bit width Configurations Configuration specification

More information

Design of Arithmetic circuits

Design of Arithmetic circuits Design of Arithmetic circuits ic principle of pipelining ditional approach Input Data clk Process < 100 ns Through 10 MH elining approach Throughput considerably. increases Chip area also increases. Latency

More information

CprE 583 Reconfigurable Computing

CprE 583 Reconfigurable Computing Recap Moore FSM Example CprE / ComS 583 Reconfigurable Computing Moore FSM that recognizes sequence 10 0 1 0 1 S0 / 0 S1 / 0 1 S2 / 1 Prof. Joseph Zambreno Department of Electrical and Computer Engineering

More information

VHDL for Modeling - Module 10

VHDL for Modeling - Module 10 VHDL for Modeling Module 10 Jim Duckworth, WPI 1 Overview General examples AND model Flip-flop model SRAM Model Generics DDR SDRAM Model Constraints Metastability Block Statements Just for reference Jim

More information

Sequential Logic - Module 5

Sequential Logic - Module 5 Sequential Logic Module 5 Jim Duckworth, WPI 1 Latches and Flip-Flops Implemented by using signals in IF statements that are not completely specified Necessary latches or registers are inferred by the

More information

DESCRIPTION OF DIGITAL CIRCUITS USING VHDL

DESCRIPTION OF DIGITAL CIRCUITS USING VHDL DESCRIPTION OF DIGITAL CIRCUITS USING VHDL Combinatinal circuits Sequential circuits Design organization. Generic design Iterative operations Authors: Luis Entrena Arrontes, Celia López, Mario García,

More information

EECS150 - Digital Design Lecture 5 - Verilog Logic Synthesis

EECS150 - Digital Design Lecture 5 - Verilog Logic Synthesis EECS150 - Digital Design Lecture 5 - Verilog Logic Synthesis Jan 31, 2012 John Wawrzynek Spring 2012 EECS150 - Lec05-verilog_synth Page 1 Outline Quick review of essentials of state elements Finite State

More information

CS303 LOGIC DESIGN FINAL EXAM

CS303 LOGIC DESIGN FINAL EXAM JANUARY 2017. CS303 LOGIC DESIGN FINAL EXAM STUDENT NAME & ID: DATE: Instructions: Examination time: 100 min. Write your name and student number in the space provided above. This examination is closed

More information

Hello, World: A Simple Application for the Field Programmable Port Extender (FPX)

Hello, World: A Simple Application for the Field Programmable Port Extender (FPX) Hello, World: A Simple Application for the Field Programmable Port Extender (FPX) John Lockwood, David Lim WUCS-TM-00-12 July 11, 2000 Department of Computer Science Applied Research Lab Washington University

More information

Lecture 3: Modeling in VHDL. EE 3610 Digital Systems

Lecture 3: Modeling in VHDL. EE 3610 Digital Systems EE 3610: Digital Systems 1 Lecture 3: Modeling in VHDL VHDL: Overview 2 VHDL VHSIC Hardware Description Language VHSIC=Very High Speed Integrated Circuit Programming language for modelling of hardware

More information

VHDL And Synthesis Review

VHDL And Synthesis Review VHDL And Synthesis Review VHDL In Detail Things that we will look at: Port and Types Arithmetic Operators Design styles for Synthesis VHDL Ports Four Different Types of Ports in: signal values are read-only

More information

ECE 545 Lecture 12. FPGA Resources. George Mason University

ECE 545 Lecture 12. FPGA Resources. George Mason University ECE 545 Lecture 2 FPGA Resources George Mason University Recommended reading 7 Series FPGAs Configurable Logic Block: User Guide Overview Functional Details 2 What is an FPGA? Configurable Logic Blocks

More information

COE 405, Term 062. Design & Modeling of Digital Systems. HW# 1 Solution. Due date: Wednesday, March. 14

COE 405, Term 062. Design & Modeling of Digital Systems. HW# 1 Solution. Due date: Wednesday, March. 14 COE 405, Term 062 Design & Modeling of Digital Systems HW# 1 Solution Due date: Wednesday, March. 14 Q.1. Consider the 4-bit carry-look-ahead adder (CLA) block shown below: A 3 -A 0 B 3 -B 0 C 3 4-bit

More information

University of California at Berkeley College of Engineering Department of Electrical Engineering and Computer Sciences. Spring 2010 May 10, 2010

University of California at Berkeley College of Engineering Department of Electrical Engineering and Computer Sciences. Spring 2010 May 10, 2010 University of California at Berkeley College of Engineering Department of Electrical Engineering and Computer Sciences EECS150 J. Wawrzynek Spring 2010 May 10, 2010 Final Exam Name: ID number: This is

More information

Chapter 6 Combinational-Circuit Building Blocks

Chapter 6 Combinational-Circuit Building Blocks Chapter 6 Combinational-Circuit Building Blocks Commonly used combinational building blocks in design of large circuits: Multiplexers Decoders Encoders Comparators Arithmetic circuits Multiplexers A multiplexer

More information

VHDL: RTL Synthesis Basics. 1 of 59

VHDL: RTL Synthesis Basics. 1 of 59 VHDL: RTL Synthesis Basics 1 of 59 Goals To learn the basics of RTL synthesis. To be able to synthesize a digital system, given its VHDL model. To be able to relate VHDL code to its synthesized output.

More information

2015 Paper E2.1: Digital Electronics II

2015 Paper E2.1: Digital Electronics II s 2015 Paper E2.1: Digital Electronics II Answer ALL questions. There are THREE questions on the paper. Question ONE counts for 40% of the marks, other questions 30% Time allowed: 2 hours (Not to be removed

More information

VHDL for Synthesis. Course Description. Course Duration. Goals

VHDL for Synthesis. Course Description. Course Duration. Goals VHDL for Synthesis Course Description This course provides all necessary theoretical and practical know how to write an efficient synthesizable HDL code through VHDL standard language. The course goes

More information

Verilog Sequential Logic. Verilog for Synthesis Rev C (module 3 and 4)

Verilog Sequential Logic. Verilog for Synthesis Rev C (module 3 and 4) Verilog Sequential Logic Verilog for Synthesis Rev C (module 3 and 4) Jim Duckworth, WPI 1 Sequential Logic Module 3 Latches and Flip-Flops Implemented by using signals in always statements with edge-triggered

More information

One and a half hours. Section A is COMPULSORY UNIVERSITY OF MANCHESTER SCHOOL OF COMPUTER SCIENCE

One and a half hours. Section A is COMPULSORY UNIVERSITY OF MANCHESTER SCHOOL OF COMPUTER SCIENCE One and a half hours Section A is COMPULSORY UNIVERSITY OF MANCHESTER SCHOOL OF COMPUTER SCIENCE Fundamentals of Computer Engineering Date: Thursday 21st January 2016 Time: 14:00-15:30 Answer BOTH Questions

More information

KINGS COLLEGE OF ENGINEERING DEPARTMENT OF ELECTRICAL AND ELECTRONICS ENGINEERING QUESTION BANK NAME OF THE SUBJECT: EE 2255 DIGITAL LOGIC CIRCUITS

KINGS COLLEGE OF ENGINEERING DEPARTMENT OF ELECTRICAL AND ELECTRONICS ENGINEERING QUESTION BANK NAME OF THE SUBJECT: EE 2255 DIGITAL LOGIC CIRCUITS KINGS COLLEGE OF ENGINEERING DEPARTMENT OF ELECTRICAL AND ELECTRONICS ENGINEERING QUESTION BANK NAME OF THE SUBJECT: EE 2255 DIGITAL LOGIC CIRCUITS YEAR / SEM: II / IV UNIT I BOOLEAN ALGEBRA AND COMBINATIONAL

More information

In our case Dr. Johnson is setting the best practices

In our case Dr. Johnson is setting the best practices VHDL Best Practices Best Practices??? Best practices are often defined by company, toolset or device In our case Dr. Johnson is setting the best practices These rules are for Class/Lab purposes. Industry

More information

VHDL simulation and synthesis

VHDL simulation and synthesis VHDL simulation and synthesis How we treat VHDL in this course You will not become an expert in VHDL after taking this course The goal is that you should learn how VHDL can be used for simulation and synthesis

More information

Outline. CPE/EE 422/522 Advanced Logic Design L05. Review: General Model of Moore Sequential Machine. Review: Mealy Sequential Networks.

Outline. CPE/EE 422/522 Advanced Logic Design L05. Review: General Model of Moore Sequential Machine. Review: Mealy Sequential Networks. Outline CPE/EE 422/522 Advanced Logic Design L05 Electrical and Computer Engineering University of Alabama in Huntsville What we know Combinational Networks Sequential Networks: Basic Building Blocks,

More information

An easy to read reference is:

An easy to read reference is: 1. Synopsis: Timing Analysis and Timing Constraints The objective of this lab is to make you familiar with two critical reports produced by the Xilinx ISE during your design synthesis and implementation.

More information

Sequential Statement

Sequential Statement Sequential Statement Sequential Logic Output depends not only on current input values but also on previous input values. Are building blocks of; Counters Shift registers Memories Flip flops are basic sequential

More information

Lecture 11 Memories in Xilinx FPGAs

Lecture 11 Memories in Xilinx FPGAs Lecture 11 Memories in Xilinx FPGAs ECE 448 FPGA and ASIC Design with VHDL Recommended reading XAPP463 Using Block RAM in Spartan-3 Generation FPGAs Google search: XAPP463 XAPP464 Using Look-Up Tables

More information

CPE 626 Advanced VLSI Design Lecture 6: VHDL Synthesis. Register File: An Example. Register File: An Example (cont d) Aleksandar Milenkovic

CPE 626 Advanced VLSI Design Lecture 6: VHDL Synthesis. Register File: An Example. Register File: An Example (cont d) Aleksandar Milenkovic CPE 626 Lecture 6: VHDL Synthesis Aleksandar Milenkovic http://www.ece.uah.edu/~milenka http://www.ece.uah.edu/~milenka/cpe626-04f/ milenka@ece.uah.edu Assistant Professor Electrical and Computer Engineering

More information

EEL 4712 Digital Design Test 1 Spring Semester 2007

EEL 4712 Digital Design Test 1 Spring Semester 2007 IMPORTANT: Please be neat and write (or draw) carefully. If we cannot read it with a reasonable effort, it is assumed wrong. COVER SHEET: Problem: Points: 1 (15 pts) 2 (20 pts) Total 3 (15 pts) 4 (18 pts)

More information

EECS Components and Design Techniques for Digital Systems. Lec 20 RTL Design Optimization 11/6/2007

EECS Components and Design Techniques for Digital Systems. Lec 20 RTL Design Optimization 11/6/2007 EECS 5 - Components and Design Techniques for Digital Systems Lec 2 RTL Design Optimization /6/27 Shauki Elassaad Electrical Engineering and Computer Sciences University of California, Berkeley Slides

More information

VHDL: Modeling RAM and Register Files. Textbook Chapters: 6.6.1, 8.7, 8.8, 9.5.2, 11.2

VHDL: Modeling RAM and Register Files. Textbook Chapters: 6.6.1, 8.7, 8.8, 9.5.2, 11.2 VHDL: Modeling RAM and Register Files Textbook Chapters: 6.6.1, 8.7, 8.8, 9.5.2, 11.2 Memory Synthesis Approaches: Random logic using flip-flops or latches Register files in datapaths RAM standard components

More information

Hardware Description Language VHDL (1) Introduction

Hardware Description Language VHDL (1) Introduction Hardware Description Language VHDL (1) Introduction Digital Radiation Measurement and Spectroscopy NE/RHP 537 Introduction Hardware description language (HDL) Intended to describe circuits textually, for

More information

Verilog Module 1 Introduction and Combinational Logic

Verilog Module 1 Introduction and Combinational Logic Verilog Module 1 Introduction and Combinational Logic Jim Duckworth ECE Department, WPI 1 Module 1 Verilog background 1983: Gateway Design Automation released Verilog HDL Verilog and simulator 1985: Verilog

More information

VHDL Examples Mohamed Zaky

VHDL Examples Mohamed Zaky VHDL Examples By Mohamed Zaky (mz_rasmy@yahoo.co.uk) 1 Half Adder The Half Adder simply adds 2 input bits, to produce a sum & carry output. Here we want to add A + B to produce Sum (S) and carry (C). A

More information

Summary of FPGA & VHDL

Summary of FPGA & VHDL FYS4220/9220 Summary of FPGA & VHDL Lecture #6 Jan Kenneth Bekkeng, University of Oslo - Department of Physics 16.11.2011 Curriculum (VHDL & FPGA part) Curriculum (Syllabus) defined by: Lectures Lecture6:

More information

Sign here to give permission for your test to be returned in class, where others might see your score:

Sign here to give permission for your test to be returned in class, where others might see your score: EEL 4712 Midterm 2 Spring 216 VERSION 1 Name: UFID: Sign here to give permission for your test to be returned in class, where others might see your score: IMPORTANT: Please be neat and write (or draw)

More information

Synthesis from VHDL. Krzysztof Kuchcinski Department of Computer Science Lund Institute of Technology Sweden

Synthesis from VHDL. Krzysztof Kuchcinski Department of Computer Science Lund Institute of Technology Sweden Synthesis from VHDL Krzysztof Kuchcinski Krzysztof.Kuchcinski@cs.lth.se Department of Computer Science Lund Institute of Technology Sweden March 23, 2006 Kris Kuchcinski (LTH) Synthesis from VHDL March

More information

EITF35 - Introduction to the Structured VLSI Design (Fall 2016) Interfacing Keyboard with FPGA Board. (FPGA Interfacing) Teacher: Dr.

EITF35 - Introduction to the Structured VLSI Design (Fall 2016) Interfacing Keyboard with FPGA Board. (FPGA Interfacing) Teacher: Dr. EITF35 - Introduction to the Structured VLSI Design (Fall 2016) Interfacing Keyboard with FPGA Board (FPGA Interfacing) Teacher: Dr. Liang Liu v.1.0.0 1 Abstract This document describes the basic behavior

More information

CSE 260 Digital Computers: Organization and Logical Design. Exam 2. Jon Turner 3/28/2012

CSE 260 Digital Computers: Organization and Logical Design. Exam 2. Jon Turner 3/28/2012 CSE 260 Digital Computers: Organization and Logical Design Exam 2 Jon Turner 3/28/2012 1. (15 points). Draw a diagram for a circuit that implements the VHDL module shown below. Your diagram may include

More information

ECEU530. Schedule. ECE U530 Digital Hardware Synthesis. Datapath for the Calculator (HW 5) HW 5 Datapath Entity

ECEU530. Schedule. ECE U530 Digital Hardware Synthesis. Datapath for the Calculator (HW 5) HW 5 Datapath Entity ECE U530 Digital Hardware Synthesis Prof. Miriam Leeser mel@coe.neu.edu November 6, 2006 Classes November 6 and 8 are in 429 Dana! Lecture 15: Homework 5: Datapath How to write a testbench for synchronous

More information

[VARIABLE declaration] BEGIN. sequential statements

[VARIABLE declaration] BEGIN. sequential statements PROCESS statement (contains sequential statements) Simple signal assignment statement

More information

Digital Design with SystemVerilog

Digital Design with SystemVerilog Digital Design with SystemVerilog Prof. Stephen A. Edwards Columbia University Spring 25 Synchronous Digital Design Combinational Logic Sequential Logic Summary of Modeling Styles Testbenches Why HDLs?

More information

APPENDIX 1 SINUSOIDAL PULSE WIDTH MODULATION

APPENDIX 1 SINUSOIDAL PULSE WIDTH MODULATION 120 APPENDIX 1 SINUSOIDAL PULSE WIDTH MODULATION % A Program For Analysis of SINUSOIDAL PULSE WIDTH MODULATION of Inverter Fed AC Drive % Signal. % By: R.Rajran % Date 08/06/2011 % clear all disp('sinusoidal

More information

Quartus Counter Example. Last updated 9/6/18

Quartus Counter Example. Last updated 9/6/18 Quartus Counter Example Last updated 9/6/18 Create a logic design from start to a DE10 implementation This example uses best design practices This example is not about creating HDL The HDL code will be

More information

Verilog for High Performance

Verilog for High Performance Verilog for High Performance Course Description This course provides all necessary theoretical and practical know-how to write synthesizable HDL code through Verilog standard language. The course goes

More information

3 Designing Digital Systems with Algorithmic State Machine Charts

3 Designing Digital Systems with Algorithmic State Machine Charts 3 Designing with Algorithmic State Machine Charts An ASM chart is a method of describing the sequential operations of a digital system which has to implement an algorithm. An algorithm is a well defined

More information

VHDL. VHDL History. Why VHDL? Introduction to Structured VLSI Design. Very High Speed Integrated Circuit (VHSIC) Hardware Description Language

VHDL. VHDL History. Why VHDL? Introduction to Structured VLSI Design. Very High Speed Integrated Circuit (VHSIC) Hardware Description Language VHDL Introduction to Structured VLSI Design VHDL I Very High Speed Integrated Circuit (VHSIC) Hardware Description Language Joachim Rodrigues A Technology Independent, Standard Hardware description Language

More information

ECE Digital Design Laboratory. Lecture 3 Finite State Machines!

ECE Digital Design Laboratory. Lecture 3 Finite State Machines! ECE 4401 - Digital Design Laboratory Lecture 3 Finite State Machines! 1!!!! Synchronous Sequential Circuits!!! Synchronous sequential logic circuits are realized using combinational logic and storage elements

More information

HDL. Hardware Description Languages extensively used for:

HDL. Hardware Description Languages extensively used for: HDL Hardware Description Languages extensively used for: Describing (digital) hardware (formal documentation) Simulating it Verifying it Synthesizing it (first step of modern design flow) 2 main options:

More information

Nanosistemų programavimo kalbos 5 paskaita. Sekvencinių schemų projektavimas

Nanosistemų programavimo kalbos 5 paskaita. Sekvencinių schemų projektavimas Nanosistemų programavimo kalbos 5 paskaita Sekvencinių schemų projektavimas Terminai Combinational circuit kombinacinė schema (be atminties elementų) Sequential circuit nuosekli (trigerinė, sekvencinė)

More information

COVER SHEET: Total: Regrade Info: 5 (14 points) 7 (15 points) Midterm 1 Spring 2012 VERSION 1 UFID:

COVER SHEET: Total: Regrade Info: 5 (14 points) 7 (15 points) Midterm 1 Spring 2012 VERSION 1 UFID: EEL 4712 Midterm 1 Spring 2012 VERSION 1 Name: UFID: IMPORTANT: Please be neat and write (or draw) carefully. If we cannot read it with a reasonable effort, it is assumed wrong. As always, the best answer

More information

Using ModelSim to Simulate Logic Circuits in VHDL Designs. 1 Introduction. For Quartus II 13.0

Using ModelSim to Simulate Logic Circuits in VHDL Designs. 1 Introduction. For Quartus II 13.0 Using ModelSim to Simulate Logic Circuits in VHDL Designs For Quartus II 13.0 1 Introduction This tutorial is a basic introduction to ModelSim, a Mentor Graphics simulation tool for logic circuits. We

More information

Microcomputers. Outline. Number Systems and Digital Logic Review

Microcomputers. Outline. Number Systems and Digital Logic Review Microcomputers Number Systems and Digital Logic Review Lecture 1-1 Outline Number systems and formats Common number systems Base Conversion Integer representation Signed integer representation Binary coded

More information

Abi Farsoni, Department of Nuclear Engineering and Radiation Health Physics, Oregon State University

Abi Farsoni, Department of Nuclear Engineering and Radiation Health Physics, Oregon State University Hardware description language (HDL) Intended to describe circuits textually, for a computer to read Evolved starting in the 1970s and 1980s Popular languages today include: VHDL Defined in 1980s by U.S.

More information

Synthesis vs. Compilation Descriptions mapped to hardware Verilog design patterns for best synthesis. Spring 2007 Lec #8 -- HW Synthesis 1

Synthesis vs. Compilation Descriptions mapped to hardware Verilog design patterns for best synthesis. Spring 2007 Lec #8 -- HW Synthesis 1 Verilog Synthesis Synthesis vs. Compilation Descriptions mapped to hardware Verilog design patterns for best synthesis Spring 2007 Lec #8 -- HW Synthesis 1 Logic Synthesis Verilog and VHDL started out

More information

CSE 260 Introduction to Digital Logic and Computer Design. Exam 1 Solutions

CSE 260 Introduction to Digital Logic and Computer Design. Exam 1 Solutions CSE 6 Introduction to igital Logic and Computer esign Exam Solutions Jonathan Turner /3/4. ( points) raw a logic diagram that implements the expression (B+C)(C +)(B+ ) directly (do not simplify first),

More information

DIGITAL LOGIC DESIGN VHDL Coding for FPGAs

DIGITAL LOGIC DESIGN VHDL Coding for FPGAs IGITAL LOGIC SIGN VHL Coding for FPGAs SUNTIAL CIRCUITS Unit 5 Asynchronous sequential circuits: Latches Synchronous circuits: flip flops, counters, registers. Testbench: Generating stimulus COMBINATIONAL

More information

DIGITAL LOGIC DESIGN VHDL Coding for FPGAs Unit 6

DIGITAL LOGIC DESIGN VHDL Coding for FPGAs Unit 6 DIGITAL LOGIC DESIGN VHDL Coding for FPGAs Unit 6 FINITE STATE MACHINES (FSMs) Moore Machines Mealy Machines Algorithmic State Machine (ASM) charts FINITE STATE MACHINES (FSMs) Classification: Moore Machine:

More information

CSE140L: Components and Design Techniques for Digital Systems Lab

CSE140L: Components and Design Techniques for Digital Systems Lab CSE140L: Components and Design Techniques for Digital Systems Lab Tajana Simunic Rosing Source: Vahid, Katz, Culler 1 Announcements & Outline Lab 4 due; demo signup times listed on the cse140l site Check

More information

Two HDLs used today VHDL. Why VHDL? Introduction to Structured VLSI Design

Two HDLs used today VHDL. Why VHDL? Introduction to Structured VLSI Design Two HDLs used today Introduction to Structured VLSI Design VHDL I VHDL and Verilog Syntax and ``appearance'' of the two languages are very different Capabilities and scopes are quite similar Both are industrial

More information

Topics. Midterm Finish Chapter 7

Topics. Midterm Finish Chapter 7 Lecture 9 Topics Midterm Finish Chapter 7 ROM (review) Memory device in which permanent binary information is stored. Example: 32 x 8 ROM Five input lines (2 5 = 32) 32 outputs, each representing a memory

More information

CprE 583 Reconfigurable Computing

CprE 583 Reconfigurable Computing Recap 4:1 Multiplexer CprE / ComS 583 Reconfigurable Computing Prof. Joseph Zambreno Department of Electrical and Computer Engineering Iowa State University Lecture #18 VHDL for Synthesis I LIBRARY ieee

More information

VHDL Testbench. Test Bench Syntax. VHDL Testbench Tutorial 1. Contents

VHDL Testbench. Test Bench Syntax. VHDL Testbench Tutorial 1. Contents VHDL Testbench Tutorial 1 Contents 1 VHDL Testbench 2 Test Bench Syntax 3 Testbench Example: VHDL Code for Up Down Binary Counter 4 VHDL Testbench code for up down binary counter 5 Testbench Waveform for

More information

Lab 1 Modular Design and Testbench Simulation ENGIN 341 Advanced Digital Design University of Massachusetts Boston

Lab 1 Modular Design and Testbench Simulation ENGIN 341 Advanced Digital Design University of Massachusetts Boston Lab 1 Modular Design and Testbench Simulation ENGIN 341 Advanced Digital Design University of Massachusetts Boston Introduction This lab introduces the concept of modular design by guiding you through

More information

COVER SHEET: Total: Regrade Info: 5 (5 points) 2 (8 points) 6 (10 points) 7b (13 points) 7c (13 points) 7d (13 points)

COVER SHEET: Total: Regrade Info: 5 (5 points) 2 (8 points) 6 (10 points) 7b (13 points) 7c (13 points) 7d (13 points) EEL 4712 Midterm 2 Spring 2011 VERSION 1 Name: UFID: Sign your name here if you would like for your test to be returned in class: IMPORTANT: Please be neat and write (or draw) carefully. If we cannot read

More information

EE 459/500 HDL Based Digital Design with Programmable Logic. Lecture 6 Combinational and sequential circuits

EE 459/500 HDL Based Digital Design with Programmable Logic. Lecture 6 Combinational and sequential circuits EE 459/5 HL Based igital esign with Programmable Logic Lecture 6 ombinational and sequential circuits Read before class: hapter 2 from textbook Overview ombinational circuits Multiplexer, decoders, encoders,

More information

Written exam for IE1204/5 Digital Design Thursday 29/

Written exam for IE1204/5 Digital Design Thursday 29/ Written exam for IE1204/5 Digital Design Thursday 29/10 2015 9.00-13.00 General Information Examiner: Ingo Sander. Teacher: William Sandqvist phone 08-7904487 Exam text does not have to be returned when

More information

FPGA for Software Engineers

FPGA for Software Engineers FPGA for Software Engineers Course Description This course closes the gap between hardware and software engineers by providing the software engineer all the necessary FPGA concepts and terms. The course

More information

CSE140L: Components and Design

CSE140L: Components and Design CSE140L: Components and Design Techniques for Digital Systems Lab Tajana Simunic Rosing Source: Vahid, Katz, Culler 1 Grade distribution: 70% Labs 35% Lab 4 30% Lab 3 20% Lab 2 15% Lab 1 30% Final exam

More information

DIGITAL LOGIC WITH VHDL (Fall 2013) Unit 6

DIGITAL LOGIC WITH VHDL (Fall 2013) Unit 6 DIGITAL LOGIC WITH VHDL (Fall 2013) Unit 6 FINITE STATE MACHINES (FSMs) Moore Machines Mealy Machines FINITE STATE MACHINES (FSMs) Classification: Moore Machine: Outputs depend only on the current state

More information

A Brief Introduction to Verilog Hardware Definition Language (HDL)

A Brief Introduction to Verilog Hardware Definition Language (HDL) www.realdigital.org A Brief Introduction to Verilog Hardware Definition Language (HDL) Forward Verilog is a Hardware Description language (HDL) that is used to define the structure and/or behavior of digital

More information

Today. Comments about assignment Max 1/T (skew = 0) Max clock skew? Comments about assignment 3 ASICs and Programmable logic Others courses

Today. Comments about assignment Max 1/T (skew = 0) Max clock skew? Comments about assignment 3 ASICs and Programmable logic Others courses Today Comments about assignment 3-43 Comments about assignment 3 ASICs and Programmable logic Others courses octor Per should show up in the end of the lecture Mealy machines can not be coded in a single

More information

Inferring Storage Elements

Inferring Storage Elements Inferring Storage Elements In our designs, we usually use flip-flops as our storage elements. Sometimes we use latches, but not often. Latches are smaller in size, but create special, often difficult situations

More information

1 ST SUMMER SCHOOL: VHDL BOOTCAMP PISA, JULY 2013

1 ST SUMMER SCHOOL: VHDL BOOTCAMP PISA, JULY 2013 MARIE CURIE IAPP: FAST TRACKER FOR HADRON COLLIDER EXPERIMENTS 1 ST SUMMER SCHOOL: VHDL BOOTCAMP PISA, JULY 2013 Introduction to VHDL Calliope-Louisa Sotiropoulou PhD Candidate/Researcher Aristotle University

More information

CPE 626 Advanced VLSI Design Lecture 7: VHDL Synthesis

CPE 626 Advanced VLSI Design Lecture 7: VHDL Synthesis CPE 626 Lecture 7 VHDL Synthes Aleksar Milenkovic http//www.ece.uah.edu/~milenka http//www.ece.uah.edu/~milenka/cpe626-04f/ milenka@ece.uah.edu Asstant Pressor Electrical Computer Engineering Dept. University

More information

Writing Circuit Descriptions 8

Writing Circuit Descriptions 8 8 Writing Circuit Descriptions 8 You can write many logically equivalent descriptions in Verilog to describe a circuit design. However, some descriptions are more efficient than others in terms of the

More information

FPGA Design Challenge :Techkriti 14 Digital Design using Verilog Part 1

FPGA Design Challenge :Techkriti 14 Digital Design using Verilog Part 1 FPGA Design Challenge :Techkriti 14 Digital Design using Verilog Part 1 Anurag Dwivedi Digital Design : Bottom Up Approach Basic Block - Gates Digital Design : Bottom Up Approach Gates -> Flip Flops Digital

More information

Luleå University of Technology Kurskod SMD152 Datum Skrivtid

Luleå University of Technology Kurskod SMD152 Datum Skrivtid Luleå University of Technology Kurskod SMD152 Datum 2003-10-24 Skrivtid 9.00 13.00 1 Manual synthesis (10 p, 2 p each) Here you are given five different VHDL models. Your task is to draw the schematics

More information

Verilog for Synthesis Ing. Pullini Antonio

Verilog for Synthesis Ing. Pullini Antonio Verilog for Synthesis Ing. Pullini Antonio antonio.pullini@epfl.ch Outline Introduction to Verilog HDL Describing combinational logic Inference of basic combinational blocks Describing sequential circuits

More information