Design Problem 5 Solution

Size: px
Start display at page:

Download "Design Problem 5 Solution"

Transcription

1 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 a stack that can be used for calling subroutines. Specifically, you are to add a new register to the processor called SP (for stack pointer) and six instructions. These instructions are designed for use with a stack that grows downward in memory. The new instructions and their encodings are defined below Read SP. ACC := SP Write SP. SP := ACC Push. M[SP] := ACC; SP := SP Pop. ACC := M[SP+1] := ACC; SP := SP Return. PC := M[SP+1]; SP := SP + 1. bxxx Call. M[sp] := PC; PC := 0xxx; SP := SP 1. Your design notes should include a diagram similar to the one on page 6-20 of the notes, showing where the stack pointer fits within the processor. Your diagram should show all connections between the stack pointer and other components of the system. Your design notes should also include timing diagrams like those on page 6.25, for each of the new instructions. Highlight all changes you make to the processor VHDL. Demonstrate the use of the new instructions by writing a program that includes a recursive subroutine sumvals(k) that returns the value k. Write sumvals based on the following pseudo-code. sumvals(k) if k=0 then return 0; else return k + sumvals(k 1); Your test program should include a top level call to sumvals with an argument of 5. Use the call and return functions to branch to and from sumvals. You will also need to push the current value of k onto the stack when you make the recursive call to sumvals. Remember to pop this value off, before you return. The argument to sumvals and the returned value can be passed either in the accumulator or on the stack. The value returned to the main program should be stored in location 001f on completion of the program. Run a functional simulation of the processor with your program running. Your simulation should show all the processor registers, including sp, as well as the processor state and tick. Include a zoomed-out display of the simulation run that allows one to see how the values of - 1 -

2 SP and ACC change. Also, include detailed views of the start of the run, the middle of the run (where sumvals returns for the first time) and the end of the run. Annotate the simulation output to identify what is happening in the program at various points. Look at the synthesis report for the processor, in particular the part that describes the number of flip flops and lookup tables uses (LUTs). Do your best to explain the numbers. Can you account for all the flip flops reported? How does the number of LUTs compare to the number of flip flops (excluding those accounted for by the memory)? Based on your knowledge of the processor logic, does the number of LUTs seem reasonable? Why or why not? - 2 -

3 Design notes adding stack to simple processor. The objective of this project is to extend the basic processor to include a stack that can be used for calling subroutines. This involves adding a stack pointer (SP) to the set of processor registers and implementing the six instructions shown below Read SP. ACC := SP Write SP. SP := ACC Push. M[SP] := ACC; SP := SP Pop. ACC := M[SP+1] := ACC; SP := SP Return. PC := M[SP+1]; SP := SP + 1. bxxx Call. M[sp] := PC; PC := 0xxx; SP := SP 1. The Read and Write SP instructions simply involve transferring values between the ACC and SP registers. Since they don t require access to memory, they can be implemented in a single clock tick. The Push instruction involves writing the value of the ACC onto the stack. That is, it requires a write to memory and we can implement the instruction using the same timing of events that is used in the direct store instruction. The Call instruction also requires a write to memory. The Pop and Return instructions require reading from memory. These can use the same timing as the direct load instruction. Block diagram. The figure below shows the modified block diagram for the processor. The main addition is the SP, which has connections to and from the ACC for the Read and Write SP instructions. The SP output also connects to the address bus and there is an increment circuit that allows the value of SP+1 to be placed on the address bus. The other changes to the block diagram involve the program counter. To implement the call and return instructions, we must be able to load the value of the PC from the data bus and put its value on the data bus. The circuitry required to enable this has been added to the block diagram. Addr Data IREG LD decode PC LD + IAR LD SP LD + +1 ACC LD compare ALU OP Control Logic (combinational circuit) mem_en mem_rw state tick

4 Instruction timing. Timing diagrams showing when various events occur in the new instruction appear below. In the Read and Write SP instructions, the only events are the loading of the ACC and SP, which occur at the end of the instruction. For the Pop and Return instructions, we have to read data from memory, using SP+1 as the memory address. The value returned from memory is stored in either the ACC or the PC, depending on the instruction. The SP is incremented at the end of the instruction. Alternatively, one can implement this instruction with the SP incremented before the memory access. This would require adding logic at the end of the instruction fetch. The Push and Call instructions involve writing information to memory from either the ACC or the PC. In both cases, the address comes from the SP. The overall timing is the same as the direct store. The SP is decremented at the end of the instruction and in the case of the call, the PC is loaded with a new value from the IREG at the end of the instruction. clk Read SP Write SP Pop Return mem_en mem_rw abus sp+1 sp+1 dbus ram ram pc sp acc clk Push Call mem_en mem_rw abus sp sp dbus acc pc pc sp - 4 -

5 Processor VHDL. The processor VHDL is shown below. All changes have been highlighted. entity cpu is port ( clk, reset : in std_logic; m_en, m_rw : out std_logic; abus : out std_logic_vector(adrlength-1 downto 0); dbus : inout std_logic_vector(wordsize-1 downto 0); -- signals "exported" so they can be monitored in post-p&r simulation pcx, iarx, spx : out std_logic_vector(adrlength-1 downto 0); iregx, accx, alux : out std_logic_vector(wordsize-1 downto 0) ); end cpu; architecture cpuarch of cpu is type state_type is ( reset_state, fetch, halt, negate, mload, dload, iload, dstore, istore, branch, brzero, brpos, brneg, add, rsp, wsp, push, pop, call, ret -- instructions involving stack ); signal state: state_type; type tick_type is (t0, t1, t2, t3, t4, t5, t6, t7); signal tick: tick_type; signal pc: std_logic_vector(adrlength-1 downto 0); -- program counter signal ireg: std_logic_vector(wordsize-1 downto 0); -- instruction register signal iar: std_logic_vector(adrlength-1 downto 0); -- indirect address register signal acc: std_logic_vector(wordsize-1 downto 0); -- accumulator signal sp: std_logic_vector(wordsize-1 downto 0); -- stack pointer signal alu: std_logic_vector(wordsize-1 downto 0); -- alu output begin alu <= (not acc) + x"0001" when state = negate else acc + dbus when state = add else (alu'range => '0'); pcx <= pc; iregx <= ireg; spx <= sp; iarx <= iar; accx <= acc; alux <= alu; process(clk) -- perform actions that occur on rising clock edges function nexttick(tick: tick_type) return tick_type is begin -- return next logical value for tick case tick is when t0 => return t1; when t1 => return t2; when t2 => return t3; when t3 => return t4; when t4 => return t5; when t5 => return t6; when t6 => return t7; when others => return t0; end case; end function nexttick; procedure decode is begin -- Instruction decoding. case ireg(15 downto 12) is when x"0" => if ireg(11 downto 0) = x"000" then state <= halt; elsif ireg(11 downto 0) = x"001" then state <= negate; elsif ireg(11 downto 0) = x"002" then state <= rsp; elsif ireg(11 downto 0) = x"003" then - 5 -

6 state <= wsp; elsif ireg(11 downto 0) = x"004" then state <= push; elsif ireg(11 downto 0) = x"005" then state <= pop; elsif ireg(11 downto 0) = x"006" then state <= ret; else state <= halt; when x"1" => state <= mload; when x"2" => state <= dload; when x"3" => state <= iload; when x"4" => state <= dstore; when x"5" => state <= istore; when x"6" => state <= branch; when x"7" => state <= brzero; when x"8" => state <= brpos; when x"9" => state <= brneg; when x"a" => state <= add; when x"b" => state <= call; when others => state <= halt; end case; end procedure decode; procedure wrapup is begin -- Do this at end of every instruction state <= fetch; tick <= t0; end procedure wrapup; begin if clk'event and clk = '1' then if reset = '1' then state <= reset_state; tick <= t0; pc <= (pc'range => '0'); ireg <= (ireg'range => '0'); acc <= (acc'range => '0'); iar <= (iar'range => '0'); sp <= (sp'range => '0'); else tick <= nexttick(tick) ; -- advance time by default case state is when reset_state => state <= fetch; tick <= t0; when fetch => if tick = t1 then ireg <= dbus; if tick = t2 then decode; pc <= pc + '1'; tick <= t0; when halt => tick <= t0; -- do nothing when negate => acc <= alu; wrapup; -- load instructions when mload => if ireg(11) = '0' then -- sign extension acc <= x"0" & ireg(11 downto 0); else acc <= x"f" & ireg(11 downto 0); wrapup; when dload => if tick = t1 then acc <= dbus; if tick = t2 then wrapup; when iload => if tick = t1 then iar <= dbus; if tick = t4 then acc <= dbus; if tick = t5 then wrapup; - 6 -

7 -- store instructions when dstore => if tick = t4 then wrapup; when istore => if tick = t1 then iar <= dbus; if tick = t7 then wrapup; -- branch instructions when branch => pc <= x"0" & ireg(11 downto 0); wrapup; when brzero => if acc = x"0000" then pc <= x"0" & ireg(11 downto 0); wrapup; when brpos => if acc(15) = '0' and acc /= x"0000" then pc <= x"0" & ireg(11 downto 0); wrapup; when brneg => if acc(15) = '1' then pc <= x"0" & ireg(11 downto 0); wrapup; -- arithmetic instructions when add => if tick = t1 then acc <= alu; if tick = t2 then wrapup; -- stack instructions when rsp => acc <= sp; wrapup; when wsp => sp <= acc; wrapup; when push => if tick = t4 then sp <= sp - '1'; wrapup; when pop => if tick = t1 then acc <= dbus; if tick = t2 then sp <= sp + '1'; wrapup; when call => if tick = t4 then pc <= x"0" & ireg(11 downto 0); sp <= sp - '1'; wrapup; when ret => if tick = t1 then pc <= dbus; if tick = t2 then sp <= sp + '1'; wrapup; - 7 -

8 when others => state <= halt; end case; end process; process(clk) begin -- perform actions that occur on falling clock edges if clk'event and clk ='0' then if reset = '1' then m_en <= '0'; m_rw <= '1'; abus <= (abus'range => '0'); dbus <= (dbus'range => 'Z'); else case state is when fetch => if tick = t0 then m_en <= '1'; abus <= pc; if tick = t2 then m_en <= '0'; abus <= (abus'range => '0'); when dload => if tick = t0 then m_en <= '1'; abus <= x"0" & ireg(11 downto 0); if tick = t2 then m_en <= '0'; abus <= (abus'range => '0'); when iload => if tick = t0 then m_en <= '1'; abus <= x"0" & ireg(11 downto 0); if tick = t2 then m_en <= '0'; abus <= (abus'range => '0'); if tick = t3 then m_en <= '1'; abus <= iar; if tick = t5 then m_en <= '0'; abus <= (abus'range => '0'); when dstore => if tick = t0 then m_en <= '1'; abus <= x"0" & ireg(11 downto 0); if tick = t1 then m_rw <= '0'; dbus <= acc; if tick = t3 then m_rw <= '1'; if tick = t4 then m_en <= '0'; abus <= (abus'range => '0'); dbus <= (dbus'range => 'Z'); when istore => if tick = t0 then m_en <= '1'; abus <= x"0" & ireg(11 downto 0); if tick = t2 then m_en <= '0'; abus <= (abus'range => '0'); if tick = t3 then m_en <= '1'; abus <= iar; if tick = t4 then m_rw <= '0'; dbus <= acc; if tick = t6 then m_rw <= '1'; if tick = t7 then m_en <= '0'; abus <= (abus'range => '0'); dbus <= (dbus'range => 'Z'); when add => - 8 -

9 if tick = t0 then m_en <= '1'; abus <= x"0" & ireg(11 downto 0); if tick = t2 then m_en <= '0'; abus <= (abus'range => '0'); -- instructions involving the stack when push => if tick = t0 then m_en <= '1'; abus <= sp; if tick = t1 then m_rw <= '0'; dbus <= acc; if tick = t3 then m_rw <= '1'; if tick = t4 then m_en <= '0'; abus <= (abus'range => '0'); dbus <= (dbus'range => 'Z'); when pop => if tick = t0 then m_en <= '1'; abus <= sp + '1'; if tick = t2 then m_en <= '0'; abus <= (abus'range => '0'); when call => if tick = t0 then m_en <= '1'; abus <= sp; if tick = t1 then m_rw <= '0'; dbus <= pc; if tick = t3 then m_rw <= '1'; if tick = t4 then m_en <= '0'; abus <= (abus'range => '0'); dbus <= (dbus'range => 'Z'); when ret => if tick = t0 then m_en <= '1'; abus <= sp + '1'; if tick = t2 then m_en <= '0'; abus <= (abus'range => '0'); when others => -- do nothing end case; end process; end cpuarch; - 9 -

10 Program. The test program appears below. The main program simply calls the subroutine and then stores the returned value in location 001f. The recursive subroutine checks to see if the argument is zero and if so, simply returns (note that the argument and return value are passed in the ACC). If it must make a recursive call, it first stores the argument on the stack and checks to see if the recursive call would cause the stack to overflow (we limit the stack to the last half of memory). The value returned by the recursive call is added to the argument stored on the stack and the result of this addition is returned to the calling program. -- program using recursive subroutine to add ram(0) <= x"103f"; -- SP := x3f ram(1) <= x"0003"; ram(2) <= x"1005"; -- call sumvals(5) ram(3) <= x"b00a"; ram(4) <= x"401f"; -- save result in location x1f ram(5) <= x"0000"; -- halt -- sumvals(k) -- recursively computes k -- algorithm: if k=0 return 0 else return k+sumvals(k-1) -- argument and result passed in accumulator ram(8) <= x"0000"; -- temp1 ram(9) <= x"0000"; -- temp2 ram(10) <= x"700c"; -- if ACC = 0 then return ram(11) <= x"600d"; ram(12) <= x"0006"; ram(13) <= x"0004"; -- store ACC on stack ram(14) <= x"4008"; -- temp1 := ACC ram(15) <= x"0002"; -- if recursive call would cause stack overflow, halt ram(16) <= x"4009"; ram(17) <= x"1fde"; ram(18) <= x"a009"; ram(19) <= x"8015"; ram(20) <= x"0000"; ram(21) <= x"2008"; -- ACC := temp1 ram(22) <= x"1fff"; -- call sumvals(acc-1) ram(23) <= x"a008"; ram(24) <= x"b00a"; ram(25) <= x"4008"; -- add result to argument stored on stack ram(26) <= x"0005"; ram(27) <= x"a008"; ram(28) <= x"0006"; -- return ram(31) <= x"0000"; -- result of computation

11 Simulation results. The results shown below are a zoomed out view of the first third of the simulation run. While details are not visible at this scale, certain things can be seen, as highlighted by the annotations. Specifically, we can see values that are placed on the stack and we can observe changes to the stack pointer and accumulator. The ACC values that are stable for longer periods are the arguments to the sumvals subroutine. stack pointer accumulator stack locations return addr stacked arg stacked arg return addr

12 More simulation results. The results shown below are a zoomed out view of the middle third of the simulation run. stack pointer accumulator

13 Still more simulation results. The results shown below are a zoomed out view of the last third of the simulation run. Here, we can see the results being returned as the recursive subroutine calls unwind stack pointer accumulator final result 15=

14 Simulation details of start of execution. This view shows the instructions preceding the top level call to sumvals, the call itself and the instructions that check to see if the argument is zero. SP := x3f call sumvals(5) if k=0 return

15 Simulation details of start of execution. This segment shows the instructions leading up to the first recursive call of sumvals. Notice that the argument is pushed on the stack and stored in a temporary location. Then the SP value is stored in a temporary location, so we can check it against the limit on the stack value. push ACC temp1 := ACC check for overflow

16 Simulation details of middle of execution. This segment is from the point in the simulation where the recursion starts to unwind. Note that in this case, the call to sumvals returns when it detects that the argument is zero. call sumvals(0) if ACC=0 then return

17 Simulation details of middle of execution. This segment continues the previous segment. Here, the penultimate recursive call to sumvals is adding the value returned to the value it had previously placed on the stack. This is then returned as the subroutine value. return value from recursive call + stored value

18 Simulation details of end of execution. This segment shows the end of execution. In particular, it shows the completion of the top level call to sumvals, followed by the completion of the main program. Note that in sumvals, the argument that was previously stored on the stack is now added to the value that was returned from the recursive call to sumvals. Also note that on completion, SP is equal to 3f, indicating that the stack is now empty. The returned value of 000f is stored in location 001f in the main program. complete top level call save returned value

19 Synthesis report. An abridged version of the synthesis report appears below. This is the synthesis report for the processor only. It does not include the memory. Notes have been added at various points, discussing specific numbers. These are highlighted in bold. Release i - xst G.38 Copyright (c) Xilinx, Inc. All rights reserved.... TABLE OF CONTENTS 1) Synthesis Options Summary 2) HDL Compilation 3) HDL Analysis 4) HDL Synthesis 5) Advanced HDL Synthesis 5.1) HDL Synthesis Report 6) Low Level Synthesis 7) Final Report 7.1) Device utilization summary 7.2) TIMING REPORT... ========================================================================= * HDL Synthesis * ========================================================================= Synthesizing Unit <cpu>. Related source file is C:/260designs/sequential/vhdlAM/cpuStack/cpu.vhd. Found finite state machine <FSM_0> for signal <state> States 20 Transitions 49 Inputs 23 Outputs 20 Clock clk (rising_edge) Reset reset (positive) Reset type synchronous Reset State reset_state Power Up State reset_state Encoding automatic Implementation LUT The section above shows the synthesis of the main controller state machine. It shows 20 states, which is consistent with expectations, since there is a state for each of the 18 instructions, plus a reset state and a fetch state. Found finite state machine <FSM_1> for signal <tick> States 8 Transitions 148 Inputs 20 Outputs 25 Clock clk (rising_edge) Reset reset (positive) Reset type synchronous Reset State t0 Power Up State t0 Encoding automatic Implementation LUT The above section shows the synthesis of the tick state machine. This has eight states, as expected. Found 1-bit register for signal <m_en>. Found 1-bit register for signal <m_rw>

20 Found 16-bit register for signal <abus>. Found 16-bit tristate buffer for signal <dbus>. Found 16-bit adder for signal <$n0080> created at line 252. Found 16-bit adder for signal <$n0096>. Found 16-bit adder for signal <$n0097> created at line 186. Found 16-bit subtractor for signal <$n0100>. Found 16-bit register for signal <acc>. Found 16-bit register for signal <iar>. Found 16-bit register for signal <ireg>. Found 16-bit register for signal <Mtridata_dBus> created at line 280. Found 1-bit register for signal <Mtrien_dBus> created at line 280. Found 16-bit register for signal <pc>. Found 16-bit register for signal <sp>. Found 48 1-bit 2-to-1 multiplexers. Summary: inferred 2 Finite State Machine(s). inferred 115 D-type flip-flop(s). inferred 4 Adder/Subtracter(s). inferred 48 Multiplexer(s). inferred 16 Tristate(s). Unit <cpu> synthesized. The above section summarizes the high level synthesis. We see registers for each of the processor registers, including the new SP. There are also registers for various signals that change value on clock edges. There are three adders indicated. This is one more than was used in the original processor and presumably is used to increment and decrement the SP. The registers listed above account for 115 flip flops. Note that this does not include the flip flops used by the state machines. INFO:Xst: HDL ADVISOR - Resource sharing has identified that some arithmetic operations in this design can share the same physical resources for reduced device utilization. For improved clock frequency you may try to disable resource sharing. ========================================================================= * Advanced HDL Synthesis * ========================================================================= Advanced RAM inference... Advanced multiplier inference... Advanced Registered AddSub inference... Selecting encoding for FSM_1... Optimizing FSM <FSM_1> on signal <tick> with one-hot encoding. Selecting encoding for FSM_0... Optimizing FSM <FSM_0> on signal <state> with one-hot encoding. Dynamic shift register inference... Note that one-hot encoding has been selected for the finite state machines. This means there will be one flip flop per state for these, adding 28 flip flops to the total. ========================================================================= HDL Synthesis Report Macro Statistics # FSMs : 2 # Adders/Subtractors : 4 16-bit subtractor : 1 16-bit adder : 3 # Registers : 38 1-bit register : bit register : 7 # Multiplexers : 3 16-bit 2-to-1 multiplexer : 3 # Tristates : 1 16-bit tristate buffer :

21 ========================================================================= ========================================================================= * Low Level Synthesis * ========================================================================= Optimizing unit <cpu>... Loading device for application Xst from file '2v250.nph' in environment C:/Xilinx. Mapping all equations... Building and optimizing final netlist... Found area constraint ratio of 100 (+ 5) on block cpu, actual ratio is 21. FlipFlop state_ffd9 has been replicated 1 time(s) FlipFlop state_ffd12 has been replicated 1 time(s) FlipFlop state_ffd13 has been replicated 1 time(s) FlipFlop state_ffd2 has been replicated 1 time(s) FlipFlop tick_ffd4 has been replicated 1 time(s) FlipFlop state_ffd19 has been replicated 1 time(s) FlipFlop state_ffd7 has been replicated 1 time(s) FlipFlop tick_ffd8 has been replicated 1 time(s) FlipFlop tick_ffd7 has been replicated 2 time(s) FlipFlop state_ffd17 has been replicated 1 time(s) FlipFlop ireg_15 has been replicated 1 time(s) to handle iob=true attribute. FlipFlop ireg_14 has been replicated 1 time(s) to handle iob=true attribute. FlipFlop ireg_13 has been replicated 1 time(s) to handle iob=true attribute. FlipFlop ireg_12 has been replicated 1 time(s) to handle iob=true attribute. FlipFlop ireg_11 has been replicated 1 time(s) to handle iob=true attribute. FlipFlop ireg_10 has been replicated 1 time(s) to handle iob=true attribute. FlipFlop ireg_9 has been replicated 1 time(s) to handle iob=true attribute. FlipFlop ireg_8 has been replicated 1 time(s) to handle iob=true attribute. FlipFlop ireg_7 has been replicated 1 time(s) to handle iob=true attribute. FlipFlop ireg_6 has been replicated 1 time(s) to handle iob=true attribute. FlipFlop ireg_5 has been replicated 1 time(s) to handle iob=true attribute. FlipFlop ireg_4 has been replicated 1 time(s) to handle iob=true attribute. FlipFlop ireg_3 has been replicated 1 time(s) to handle iob=true attribute. FlipFlop ireg_2 has been replicated 1 time(s) to handle iob=true attribute. FlipFlop ireg_1 has been replicated 1 time(s) to handle iob=true attribute. FlipFlop ireg_0 has been replicated 1 time(s) to handle iob=true attribute. This above section summarizes flip flop replication, which is done to improve performance for signals that have a high fanout. Replication adds 27 flip flops to the total we would expect otherwise. ========================================================================= * Final Report * ========================================================================= Final Results RTL Top Level Output File Name : cpu.ngr Top Level Output File Name : cpu Output Format : NGC Optimization Goal : Speed Keep Hierarchy : NO Design Statistics # IOs : 132 Macro Statistics : # Registers : 10 # 1-bit register : 3 # 16-bit register : 7 # Multiplexers : 3 # 2-to-1 multiplexer : 3 # Tristates : 1 # 16-bit tristate buffer : 1 # Adders/Subtractors :

22 # 16-bit adder : 3 # 16-bit subtractor : 1 Cell Usage : # BELS : 646 # GND : 1 # LUT1 : 43 # LUT1_L : 5 # LUT2 : 33 # LUT2_D : 1 # LUT2_L : 2 # LUT3 : 106 # LUT3_D : 1 # LUT3_L : 11 # LUT4 : 282 # LUT4_D : 6 # LUT4_L : 32 # MUXCY : 54 # MUXF5 : 7 # VCC : 1 # XORCY : 61 # FlipFlops/Latches : 170 # FDE_1 : 17 # FDR : 46 # FDRE : 35 # FDRS : 51 # FDRS_1 : 17 # FDS : 3 # FDS_1 : 1 # Clock Buffers : 1 # BUFGP : 1 # IO Buffers : 131 # IBUF : 1 # IOBUF : 16 # OBUF : 114 ========================================================================= Device utilization summary: Selected Device : 2v250fg456-6 Number of Slices: 290 out of % Number of Slice Flip Flops: 170 out of % Number of 4 input LUTs: 522 out of % Number of bonded IOBs: 131 out of % Number of GCLKs: 1 out of 16 6% The number of flip flops shown above is 170. This is exactly what one would expect, based on the numbers reported earlier ( =170). The number of LUTs cannot be so easily justified. Given that FPGAs are designed with one LUT per flip flop, it does seem surprising that the circuit implementing the processor uses more than three LUTs per flip flop. From the macro statistics just above, we see there are three 2:1 muxes (one LUT each, or 3 LUTs), three 16 bit adders (32 LUTs each, or 96 LUTs) and one 16 bit subtractor (32 LUTs). This gives us 131 LUTs, about one fourth the total shown in the final summary. Clearly the synthesizer is generating lots of logic that cannot be easily associated with high level blocks like adders, but one can t tell just from the synthesis report what these extra LUTs are being used for

Introduction to Computer Design

Introduction to Computer Design Introduction to Computer Design Memory (W 800-840) Basic processor operation Processor organization Executing instructions Processor implementation using VHDL 1 Random Access Memory data_in address read/write

More information

Design Problem 5 Solutions

Design Problem 5 Solutions CS/EE 260 Digital Computers: Organization and Logical Design Design Problem 5 Solutions Jon Turner Due 5/4/04 1. (100 points) In this problem, you will implement a simple shared memory multiprocessor system

More information

Design Problem 4 Solution

Design Problem 4 Solution 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

More information

Design Problem 6 Solution

Design Problem 6 Solution CSE 260 Digital Computers: Organization and Logical Design Design Problem 6 Solution Jon Turner The modifications to the VHDL for the console appear below entity console end console; architecture a1 of

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

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

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

CS/EE Homework 9 Solutions

CS/EE Homework 9 Solutions CS/EE 260 - Homework 9 Solutions 4/16/2001 1. (20 points) Consider the program on page 1-21 and 1-22 of the lecture notes. Suppose the simple processor is augmented with a direct-mapped instruction cache

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

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

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

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

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

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

Digital System Design Using Verilog. - Processing Unit Design

Digital System Design Using Verilog. - Processing Unit Design Digital System Design Using Verilog - Processing Unit Design 1.1 CPU BASICS A typical CPU has three major components: (1) Register set, (2) Arithmetic logic unit (ALU), and (3) Control unit (CU) The register

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

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

CSE 260 Digital Computers: Organization and Logical Design. Exam 2 Solutions

CSE 260 Digital Computers: Organization and Logical Design. Exam 2 Solutions CSE 260 Digital Computers: Organization and Logical Design Exam 2 Solutions Jon Turner 1. (10 points). The table at right shows a table with 5 rows and three columns with each column having a heading.

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

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

Digital IP Cell 8-bit Microcontroller PE80

Digital IP Cell 8-bit Microcontroller PE80 1. Description The is a Z80 compliant processor soft-macro - IP block that can be implemented in digital or mixed signal ASIC designs. The Z80 and its derivatives and clones make up one of the most commonly

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

Microcomputer Architecture and Programming

Microcomputer Architecture and Programming IUST-EE (Chapter 1) Microcomputer Architecture and Programming 1 Outline Basic Blocks of Microcomputer Typical Microcomputer Architecture The Single-Chip Microprocessor Microprocessor vs. Microcontroller

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

V8-uRISC 8-bit RISC Microprocessor AllianceCORE Facts Core Specifics VAutomation, Inc. Supported Devices/Resources Remaining I/O CLBs

V8-uRISC 8-bit RISC Microprocessor AllianceCORE Facts Core Specifics VAutomation, Inc. Supported Devices/Resources Remaining I/O CLBs V8-uRISC 8-bit RISC Microprocessor February 8, 1998 Product Specification VAutomation, Inc. 20 Trafalgar Square Nashua, NH 03063 Phone: +1 603-882-2282 Fax: +1 603-882-1587 E-mail: sales@vautomation.com

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

1 MALP ( ) Unit-1. (1) Draw and explain the internal architecture of 8085.

1 MALP ( ) Unit-1. (1) Draw and explain the internal architecture of 8085. (1) Draw and explain the internal architecture of 8085. The architecture of 8085 Microprocessor is shown in figure given below. The internal architecture of 8085 includes following section ALU-Arithmetic

More information

PINE TRAINING ACADEMY

PINE TRAINING ACADEMY PINE TRAINING ACADEMY Course Module A d d r e s s D - 5 5 7, G o v i n d p u r a m, G h a z i a b a d, U. P., 2 0 1 0 1 3, I n d i a Digital Logic System Design using Gates/Verilog or VHDL 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

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

Prerequisite Quiz January 23, 2007 CS252 Computer Architecture and Engineering

Prerequisite Quiz January 23, 2007 CS252 Computer Architecture and Engineering University of California, Berkeley College of Engineering Computer Science Division EECS Spring 2007 John Kubiatowicz Prerequisite Quiz January 23, 2007 CS252 Computer Architecture and Engineering This

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

CPU Design John D. Carpinelli, All Rights Reserved 1

CPU Design John D. Carpinelli, All Rights Reserved 1 CPU Design 1997 John D. Carpinelli, All Rights Reserved 1 Outline Register organization ALU design Stacks Instruction formats and types Addressing modes 1997 John D. Carpinelli, All Rights Reserved 2 We

More information

TSEA44 - Design for FPGAs

TSEA44 - Design for FPGAs 2015-11-24 Now for something else... Adapting designs to FPGAs Why? Clock frequency Area Power Target FPGA architecture: Xilinx FPGAs with 4 input LUTs (such as Virtex-II) Determining the maximum frequency

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

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

Problem Set 1 Solutions

Problem Set 1 Solutions CSE 260 Digital Computers: Organization and Logical Design Jon Turner Problem Set 1 Solutions 1. Give a brief definition of each of the following parts of a computer system: CPU, main memory, floating

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

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

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

Lecture 7. Standard ICs FPGA (Field Programmable Gate Array) VHDL (Very-high-speed integrated circuits. Hardware Description Language)

Lecture 7. Standard ICs FPGA (Field Programmable Gate Array) VHDL (Very-high-speed integrated circuits. Hardware Description Language) Standard ICs FPGA (Field Programmable Gate Array) VHDL (Very-high-speed integrated circuits Hardware Description Language) 1 Standard ICs PLD: Programmable Logic Device CPLD: Complex PLD FPGA: Field Programmable

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

1. Internal Architecture of 8085 Microprocessor

1. Internal Architecture of 8085 Microprocessor 1. Internal Architecture of 8085 Microprocessor Control Unit Generates signals within up to carry out the instruction, which has been decoded. In reality causes certain connections between blocks of the

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

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

Computer Architecture

Computer Architecture Computer Architecture Lecture 1: Digital logic circuits The digital computer is a digital system that performs various computational tasks. Digital computers use the binary number system, which has two

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

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

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

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

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

XST User Guide

XST User Guide XST User Guide R 2005 Xilin, Inc. All Rights Reserved. XILINX, the Xilin logo, and other designated brands included herein are trademarks of Xilin, Inc. All other trademarks are the property of their respective

More information

Revolutionary Quad-Pipelined Ultra High Performance 16/32-bit Microcontroller v. 6.05

Revolutionary Quad-Pipelined Ultra High Performance 16/32-bit Microcontroller v. 6.05 DQ80251 Revolutionary Quad-Pipelined Ultra High Performance 16/32-bit Microcontroller v. 6.05 O V E R V I E W DQ80251 is a revolutionary Quad-Pipelined ultrahigh performance, speed optimized soft core,

More information

ECE 699: Lecture 9. Programmable Logic Memories

ECE 699: Lecture 9. Programmable Logic Memories ECE 699: Lecture 9 Programmable Logic Memories Recommended reading XST User Guide for Virtex-6, Spartan-6, and 7 Series Devices Chapter 7, HDL Coding Techniques Sections: RAM HDL Coding Techniques ROM

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

Blog -

Blog - . Instruction Codes Every different processor type has its own design (different registers, buses, microoperations, machine instructions, etc) Modern processor is a very complex device It contains Many

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

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

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

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 Signal Processing for Analog Input

Digital Signal Processing for Analog Input Digital Signal Processing for Analog Input Arnav Agharwal Saurabh Gupta April 25, 2009 Final Report 1 Objective The object of the project was to implement a Fast Fourier Transform. We implemented the Radix

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

ECE 545: Lecture 11. Programmable Logic Memories

ECE 545: Lecture 11. Programmable Logic Memories ECE 545: Lecture 11 Programmable Logic Memories Recommended reading Vivado Design Suite User Guide: Synthesis Chapter 4 RAM HDL Coding Techniques Initializing RAM Contents 7 Series FPGAs Memory Resources:

More information

ECE 545: Lecture 11. Programmable Logic Memories. Recommended reading. Memory Types. Memory Types. Memory Types specific to Xilinx FPGAs

ECE 545: Lecture 11. Programmable Logic Memories. Recommended reading. Memory Types. Memory Types. Memory Types specific to Xilinx FPGAs ECE 545: Lecture 11 Programmable Logic Memories Recommended reading Vivado Design Suite User Guide: Synthesis Chapter 4 RAM HDL Coding Techniques Initializing RAM Contents 7 Series FPGAs Resources: User

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

Xilinx ASMBL Architecture

Xilinx ASMBL Architecture FPGA Structure Xilinx ASMBL Architecture Design Flow Synthesis: HDL to FPGA primitives Translate: FPGA Primitives to FPGA Slice components Map: Packing of Slice components into Slices, placement of Slices

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

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

Computer Architecture Programming the Basic Computer

Computer Architecture Programming the Basic Computer 4. The Execution of the EXCHANGE Instruction The EXCHANGE routine reads the operand from the effective address and places it in DR. The contents of DR and AC are interchanged in the third microinstruction.

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

CS 2461: Computer Architecture I

CS 2461: Computer Architecture I Computer Architecture is... CS 2461: Computer Architecture I Instructor: Prof. Bhagi Narahari Dept. of Computer Science Course URL: www.seas.gwu.edu/~bhagiweb/cs2461/ Instruction Set Architecture Organization

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

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

EEL 4783: HDL in Digital System Design

EEL 4783: HDL in Digital System Design EEL 4783: HDL in Digital System Design Lecture 15: Logic Synthesis with Verilog Prof. Mingjie Lin 1 Verilog Synthesis Synthesis vs. Compilation Descriptions mapped to hardware Verilog design patterns for

More information

Finite State Machines (FSMs) and RAMs and CPUs. COS 116, Spring 2011 Sanjeev Arora

Finite State Machines (FSMs) and RAMs and CPUs. COS 116, Spring 2011 Sanjeev Arora Finite State Machines (FSMs) and RAMs and CPUs COS 116, Spring 2011 Sanjeev Arora Recap Combinational logic circuits: no cycles, hence no memory Sequential circuits: cycles allowed; can have memory as

More information

Chapter 1 Microprocessor architecture ECE 3120 Dr. Mohamed Mahmoud http://iweb.tntech.edu/mmahmoud/ mmahmoud@tntech.edu Outline 1.1 Computer hardware organization 1.1.1 Number System 1.1.2 Computer hardware

More information

ENGG3380: Computer Organization and Design Lab4: Buses and Peripheral Devices

ENGG3380: Computer Organization and Design Lab4: Buses and Peripheral Devices ENGG3380: Computer Organization and Design Lab4: Buses and Peripheral Devices School of Engineering, University of Guelph Winter 2017 1 Objectives: The purpose of this lab is : Learn basic bus design techniques.

More information

ENGR 2031 Digital Design Laboratory Lab 7 Background

ENGR 2031 Digital Design Laboratory Lab 7 Background ENGR 2031 Digital Design Laboratory Lab 7 Background What we will cover Overview of the Simple Computer (scomp) Architecture Register Flow Diagrams VHDL Implementation of scomp Lab 7 scomp Architecture

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

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

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

CHAPTER SIX BASIC COMPUTER ORGANIZATION AND DESIGN

CHAPTER SIX BASIC COMPUTER ORGANIZATION AND DESIGN CHAPTER SIX BASIC COMPUTER ORGANIZATION AND DESIGN 6.1. Instruction Codes The organization of a digital computer defined by: 1. The set of registers it contains and their function. 2. The set of instructions

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

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

ARM Activation Frame Stack

ARM Activation Frame Stack ARM Activation Frame Stack Tom Kelliher, CS 220 1 Administrivia Today s Objectives 1. Write ARM programs that pass function parameters, and return function values. 2. Write ARM programs that use the stack

More information

Logic Synthesis. EECS150 - Digital Design Lecture 6 - Synthesis

Logic Synthesis. EECS150 - Digital Design Lecture 6 - Synthesis Logic Synthesis Verilog and VHDL started out as simulation languages, but quickly people wrote programs to automatically convert Verilog code into low-level circuit descriptions (netlists). EECS150 - Digital

More information

The VHDL Hardware Description Language

The VHDL Hardware Description Language The VHDL Hardware Description Language p. 1/? The VHDL Hardware Description Language CSEE W4840 Prof. Stephen A. Edwards Columbia University The VHDL Hardware Description Language p. 2/? Why HDLs? 1970s:

More information

The Xilinx XC6200 chip, the software tools and the board development tools

The Xilinx XC6200 chip, the software tools and the board development tools The Xilinx XC6200 chip, the software tools and the board development tools What is an FPGA? Field Programmable Gate Array Fully programmable alternative to a customized chip Used to implement functions

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

קורס VHDL for High Performance. VHDL

קורס VHDL for High Performance. VHDL קורס VHDL for High Performance תיאור הקורס קורסזהמספקאתכלהידע התיאורטיוהמעשילכתיבתקודHDL. VHDL לסינתזה בעזרת שפת הסטנדרט הקורסמעמיקמאודומלמדאת הדרךהיעילהלכתיבתקודVHDL בכדילקבלאתמימושתכןהלוגי המדויק. הקורסמשלב

More information

Digital Design with FPGAs. By Neeraj Kulkarni

Digital Design with FPGAs. By Neeraj Kulkarni Digital Design with FPGAs By Neeraj Kulkarni Some Basic Electronics Basic Elements: Gates: And, Or, Nor, Nand, Xor.. Memory elements: Flip Flops, Registers.. Techniques to design a circuit using basic

More information

Job Posting (Aug. 19) ECE 425. ARM7 Block Diagram. ARM Programming. Assembly Language Programming. ARM Architecture 9/7/2017. Microprocessor Systems

Job Posting (Aug. 19) ECE 425. ARM7 Block Diagram. ARM Programming. Assembly Language Programming. ARM Architecture 9/7/2017. Microprocessor Systems Job Posting (Aug. 19) ECE 425 Microprocessor Systems TECHNICAL SKILLS: Use software development tools for microcontrollers. Must have experience with verification test languages such as Vera, Specman,

More information

COSC 243. Computer Architecture 1. COSC 243 (Computer Architecture) Lecture 6 - Computer Architecture 1 1

COSC 243. Computer Architecture 1. COSC 243 (Computer Architecture) Lecture 6 - Computer Architecture 1 1 COSC 243 Computer Architecture 1 COSC 243 (Computer Architecture) Lecture 6 - Computer Architecture 1 1 Overview Last Lecture Flip flops This Lecture Computers Next Lecture Instruction sets and addressing

More information

ECEU530. Homework 4 due Wednesday Oct 25. ECE U530 Digital Hardware Synthesis. VHDL for Synthesis with Xilinx. Schedule

ECEU530. Homework 4 due Wednesday Oct 25. ECE U530 Digital Hardware Synthesis. VHDL for Synthesis with Xilinx. Schedule EEU530 EE U530 igital Hardware Synthesis Lecture 11: Prof. Miriam Leeser mel@coe.neu.edu October 18, 2005 Sequential Logic in VHL Finite State Machines in VHL Project proposals due now HW 4 due Wednesday,

More information

6.111 Lecture # 8. Topics for Today: (as time permits)

6.111 Lecture # 8. Topics for Today: (as time permits) 6.111 Lecture # 8 Topics for Today: (as time permits) 1. Memories 2. Assembling 'packages' for designs 3. Discussion of design procedure 4. Development of a design example using a finite state machine

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

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

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

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