Case Study AM2901. Hierarchy in Large Designs

Size: px
Start display at page:

Download "Case Study AM2901. Hierarchy in Large Designs"

Transcription

1 Case Study AM2901 Hierarchy in Large Designs As a means to illustrate how a VHDL description for a meaningful digital system can be developed, we attempt to write a model for an Am2901 that is a 4 -bit microprocessor slice. The architecture consists of an ALU with multiple sources, controlled by two multiplexers, a set of RAM registers, I/O and control. As the Am2901 is a bit -slice device, processors with wordlengths of any multiple of 4, can be constructed. We will see that the Am2901 will allow us to un derstand design decomposition and the importance of hierarchy, reusable libraries, packages and parameterised components. The basic architecture is shown in Figures 1 and 2. Figure 1: Architecture of Am2901 ( Advanced Micro Devices Inc.) Stuart Lawson Page 1 17/10/2001

2 Figure 2: Am2901 Architecture used in discussion. The functional units are as follows: 1. RAM_REGS This is a 16 word dual -port RAM which we are going to realize using flip - flops. FPGA architectures with on -board RAM may be more efficient in terms of area but may make t he VHDL description non -portable. As can be seen from Fig.1, an input shifter allows data to be loaded which has been pre-shifted to the left or the right by one bit -position or unaltered. RAM0 and RAM3 are bidirectional signals used for the shift -in and s hift-out values. RAM_REGS is addressed by two 4 -bit addresses a and b. The corresponding data outputs are ad and bd. In write mode, the data at d (ALU output) is written to the address specified by b. 2. Q_REG This is a one -word register with a shift input. I ts use is primarily for multiplication and division functions. The signals qs0 and qs3 are bidirectional used for the shifting process. Stuart Lawson Page 2 17/10/2001

3 3. SRC_OP This block chooses the ALU source operands from ad, bd, the output of Q_REG, q, and direct data input, d. 4. ALU The ALU performs one of three arithmetic and five logic functions on the source operands. 5. OUT_MUX The output multiplexer chooses between the ALU output and the from RAM_REGS. ad output Mnemonic Microcode ALU Source Operands I 2 I 1 I 0 Octal R S Code AQ A Q AB A B ZQ Q ZB B ZA A DA D A DQ D Q DZ D 0 Table 1: ALU Source Operands Mnemonic Microcode ALU function I 5 I 4 I 3 Octal Code ADD R + S SUBR S - R SUBS R - S OR R OR S AND R AND S NOTRS (NOT R) and S EXOR R XOR S EXNOR R XNOR S Table 2: ALU function table Stuart Lawson Page 3 17/10/2001

4 Mnemonic Microcode RAM Function Q-Reg Function Y RAM Shifter Q Shifter Outpu t I8 I7 I6 Octal Code Shift Load Shift Load RAM0 RAM3 Q0 Q3 QREG X NONE NONE F->Q F X X X X NOP X NONE X NONE F X X X X RAMA NONE F->B X NONE A X X X X RAMF NONE F->B X NONE F X X X X RAMQD DOWN F/2->B DOWN Q/2->Q F F0 IN3 Q0 IN3 RAMD DOWN F/2->B X NONE F F0 IN3 Q0 X RAMQU UP 2F->B UP 2Q->Q F IN0 F3 IN0 Q3 RAMU UP 2F->B X NONE F IN0 F3 X Q3 Table 3: ALU Destination Table where X is don t care, B is register addressed by b address. UP is towards MSB, DOWN is towards LSB. Stuart Lawson Page 4 17/10/2001

5 The 2901 is controlled by a 9 -bit microinstruction (see Fig.1). However there may be other bits for branching around the microprogram. The use of a microprogram sequencer may be useful in this regard. Note the inputs and outputs of the A LU, other than the source operands and destination output, R, S and F. The signals in question are explained in Table 4. Signal name Input or Output Function c n I Carry input. Used for ripple -carry addition/subtraction when cascading chips. c n+4 O Carry output. Used for ripple -carry addition/subtraction when cascading chips. g_bar O Generate output. Used with carry look -ahead chip when cascading 2901s. Faster than ripple carry. p_bar O Propagate Output. Used with carry look -ahead chip when cascading 2901s. Faster than ripple carry. ovr O Arithmetic overflow indicator f_0 O True when ALU output is zero f3 O Most significant bit of output. Used to test whether result is positive or negative. Table 4: ALU inputs and outputs Building a library of components To develop a VHDL model for the Am2901, we will need some basic components. We will use a library made up of several packages. Each package contains a set of common component types such as flip -flops, registers, counters and synchronizers. To be fl exible, components will be specified in several widths. To, we will look at the design of a 1-bit wide D-type FF with an asynchronous reset. To enable the use of multi-bit FFs (registers) we will parameterize our design. -- Set of D-Type Flip-Flops sizes: (1, size) clk -- posedge clock input -- reset -- asynchronous reset -- d -- register input -- q -- register output entity rdff1 is port ( clk, reset: in std_logic; d: in std_logic; q: buffer std_logic); Stuart Lawson Page 5 17/10/2001

6 end rdff1; architecture archrdff1 of rdff1 is p1: process (reset, clk) if reset = '1' then q <= '0'; elsif (clk'event and clk='1') then q <= d; end process; end archrdff1; entity rdff is generic (size: integer := 2); port ( clk, reset: in std_logic; d: in std_logic_vector(size-1 downto 0); q: buffer std_logic_vector(size-1 downto 0)); end rdff; architecture archrdff of rdff is p1: process (reset, clk) if reset = '1' then q <= (others => '0'); elsif (clk'event and clk='1') then q <= d; end process; end archrdff; Note that i/o mode buffer is being used for output ports even if we could use mode out. This is being done to make it easier for a team design. The approach is illustrated in Figur e 3 and compares it with the use of mode out for all outputs. a b x: buffer std_logic c y: buffer std_logic Figure 3: Using mode buffer Stuart Lawson Page 6 17/10/2001

7 The use of the construct generic allows us to parameterize the D-type FF. Effectively it gives us dynamic vector declarations. The next step is to design a set of registers from D -type FF with synchronous enables and asynchronous resets. This design will also allow variable widths. -- Set of registers -- sizes: (1,size) clk -- posedge clock input -- reset -- asynchronous reset -- load -- active high input loads rregister -- d -- register input -- q -- register output entity rreg1 is port( clk, reset, load: in std_logic; d: in std_logic; q: buffer std_logic); end rreg1; architecture archrreg1 of rreg1 is p1: process (reset, clk) if reset = '1' then q <= '0'; elsif (clk'event and clk='1') then if load = '1' then q <= d; end process; end archrreg1; entity rreg is generic (size: integer := 2); port( clk, reset, load: in std_logic; d: in std_logic_vector(size-1 downto 0); q: buffer std_logic_vector(size-1 downto 0)); end rreg; architecture archrreg of rreg is p1: process (reset,clk) if reset = '1' then q <= (others => '0'); elsif (clk'event and clk='1') then Stuart Lawson Page 7 17/10/2001

8 if load = '1' then q <= d; end process; end archrreg; We will also need a general purpose register with a synchronous load. synchronous reset and preset and -- Register Set -- sizes: (size) a generic clk -- posedge clock input -- rst -- asynchronous reset -- pst -- asynchronous preset -- load -- active high input loads register -- d -- register input -- q -- register output entity reg is generic ( size: integer := 2); port( clk, load: in std_logic; rst, pst: in std_logic; d: in std_logic_vector(size-1 downto 0); q: buffer std_logic_vector(size-1 downto 0)); end reg; architecture archreg of reg is p1: process (clk) if rst = '1' then q <= (others => '0'); elsif pst = '1' then q <= (others => '1'); elsif (clk'event and clk='1') then if load = '1' then q <= d; else q <= q; end process; end archreg; In the above code, size cannot be equal to 1. This is because of the use of q <= ( others => 1 ) which implies that q is an array or aggregate. Stuart Lawson Page 8 17/10/2001

9 We now need to create some counters with asynchronous resets and synchronous initialisation and enables. If we wish to implement a counter with, say the asynchronous reset disabled then in its instantiation, the input will be permanently set to 0. This will result in reduced logic. Similarly if an output is not required then it can be left open thus c_out => open. We cannot however leave inputs open. The code for the counters follows: -- Synchronous Counter of Generic Size CounterSize -- size of counter clk -- posedge clock input -- areset -- asynchronous reset -- sreset -- active high input resets counter to 0 -- enable -- active high input enables counting -- count -- counter output use work.std_arith.all; entity ascount is generic (CounterSize: integer := 2); port( clk, areset, sreset, enable: in std_logic; count: buffer std_logic_vector(countersize-1 downto 0)); end ascount; architecture archascount of ascount is p1: process (areset, clk) if areset = '1' then count <= (others => '0'); elsif (clk'event and clk='1') then if sreset='1' then count <= (others => '0'); elsif enable = '1' then count <= count + 1; else count <= count; end process; end archascount; Next two synchronization components will be designed. These consist of t wo D-type FFs in series and are used to synchronize asynchronous inputs to the system clock. One of the synchronizers has an asynchronous reset whilst the other has an asynchronous preset. -- Synchronizers clk -- posedge clock input -- reset -- asynchronous reset (rsynch) Stuart Lawson Page 9 17/10/2001

10 -- preset -- asynchronous preset (psynch) -- d -- signal to synchronize -- q -- synchronized entity rsynch is port ( clk, reset: in std_logic; d: in std_logic; q: buffer std_logic); end rsynch; architecture archrsynch of rsynch is signal temp: std_logic; p1: process (reset, clk) if reset = '1' then q <= '0'; elsif (clk'event and clk='1') then temp <= d; q <= temp; end process; end archrsynch; entity psynch is port ( clk, preset: in std_logic; d: in std_logic; q: buffer std_logic); end psynch; architecture archpsynch of psynch is signal temp: std_logic; p1: process (preset, clk) if preset = '1' then q <= '1'; elsif (clk'event and clk='1') then temp <= d; q <= temp; end process; end archpsynch; The final member of the library of components that we are building is a set of unsigned registers that will help in the design of the Am2901. For this we will use the following standard package numeric_std. Stuart Lawson Page 10 17/10/2001

11 -- Set of registers (unsigned) -- sizes: (1,size) clk -- posedge clock input -- reset -- asynchronous reset -- load -- active high input loads rregister -- d -- register input -- q -- register output use work.numeric_std.all; entity ureg is generic (size: integer := 2); port( clk, reset, load: in std_logic; d: in unsigned(size-1 downto 0); q: buffer unsigned(size-1 downto 0)); end ureg; architecture archureg of ureg is p1: process (reset,clk) if reset = '1' then q <= (others => '0'); elsif (clk'event and clk='1') then if load = '1' then q <= d; else q <= q; end process; end archureg; Having now defined all the building blocks that we will require for the Am2901 design, it is necessary to place them in packages so that they can be used easily. Three packages will be created: regs_pkg, counters_pkg, synch_pkg. 1. regs_pkg use work.numeric_std.all; package regs_pkg is component rdff1 port ( clk, reset: in std_logic; d: in std_logic; q: buffer std_logic); component rdff Stuart Lawson Page 11 17/10/2001

12 generic (size: integer := 2); port ( clk, reset: in std_logic; d: in std_logic_vector(size-1 downto 0); q: buffer std_logic_vector(size-1 downto 0)); component pdff1 port ( clk, preset: in std_logic; d: in std_logic; q: buffer std_logic); component rreg1 port( clk, reset, load: in std_logic; d: in std_logic; q: buffer std_logic); component rreg generic (size: integer := 2); port( clk, reset, load: in std_logic; d: in std_logic_vector(size-1 downto 0); q: buffer std_logic_vector(size-1 downto 0)); component preg1 port( clk, preset, load: in std_logic; d: in std_logic; q: buffer std_logic); component preg generic(size: integer := 2); port( clk, preset, load: in std_logic; d: in std_logic_vector(size-1 downto 0); q: buffer std_logic_vector(size-1 downto 0)); component reg generic ( size: integer := 2); port( clk, load: in std_logic; rst, pst: in std_logic; d: in std_logic_vector(size-1 downto 0); q: buffer std_logic_vector(size-1 downto 0)); component ureg generic (size: integer := 2); port( clk, reset, load: in std_logic; d: in unsigned(size-1 downto 0); q: buffer unsigned(size-1 downto 0)); end regs_pkg; 2. counters_pkg Stuart Lawson Page 12 17/10/2001

13 package counters_pkg is component ascount generic (CounterSize: integer := 2); port( clk, areset, sreset, enable: in std_logic; count: buffer std_logic_vector(countersize -1 downto 0)); end counters_pkg; 3. synch_pkg package synch_pkg is component rsynch port ( clk, reset: in std_logic; d: in std_logic; q: buffer std_logic); component psynch port ( clk, preset: in std_logic; d: in std_logic; q: buffer std_logic); end synch_pkg; These packages can be compiled into a library from where they can be accessed using the use construct. For example if the library is called basic then access to it can be effected by the construct library bas ic. Individual packages or components within can be accessed by using the following as example: library basic; use basic.regs_pkg.rreg1; use basic.regs_pkg.all; -- makes library accessible -- makes rreg1 component declaration visible -- make all components in regs_pkg visible Designing the components of the Am2901 for-bit slice microprocessor Types to be used Control inputs and outputs: std_logic Microinstruction: std_logic_vector Address and Data: unsigned defined in numeric_std A package definin g all the mnemonics introduced in Tables 1 to 3 will be setup now. These mnemonics will make programming the Am2901 easier. Stuart Lawson Page 13 17/10/2001

14 package mnemonics is -- ALU source operand control mnemonics constant aq: std_logic_vector(2 downto 0) := "000"; constant ab: std_logic_vector(2 downto 0) := "001"; constant zq: std_logic_vector(2 downto 0) := "010"; constant zb: std_logic_vector(2 downto 0) := "011"; constant za: std_logic_vector(2 downto 0) := "100"; constant da: std_logic_vector(2 downto 0) := "101"; constant dq: std_logic_vector(2 downto 0) := "110"; constant dz: std_logic_vector(2 downto 0) := "111"; -- ALU function control mnemonics constant add: std_logic_vector(2 downto 0) := "000"; constant subr: std_logic_vector(2 downto 0) := "001"; constant subs: std_logic_vector(2 downto 0) := "010"; constant orrs: std_logic_vector(2 downto 0) := "011"; constant andrs:std_logic_vector(2 downto 0) := "100"; constant notrs:std_logic_vector(2 downto 0) := "101"; constant exor: std_logic_vector(2 downto 0) := "110"; constant exnor:std_logic_vector(2 downto 0) := "111"; -- ALU destination contol mnemonics constant qreg: std_logic_vector(2 downto 0) := "000"; constant nop: std_logic_vector(2 downto 0) := "001"; constant rama: std_logic_vector(2 downto 0) := "010"; constant ramf: std_logic_vector(2 downto 0) := "011"; constant ramqd: std_logic_vector(2 downto 0) := "100"; constant ramd: std_logic_vector(2 downto 0) := "101"; constant ramqu: std_logic_vector(2 downto 0) := "110"; constant ramu: std_logic_vector(2 downto 0) := "111"; end mnemonics; Register File Now we can concentrate finally on the Am2901 components. Firstly consider the design of RAM_REGS. The hardware architecture is shown i n Figure 4. There are sixteen 4 -bit wide registers made up from flip-flops. Note that four 3 to 1 multiplexers appear at the input to the register file. These are used for the shifting operation. A construct that we have not seen before is used here, namely the with.select construct. An example of its use in the implementation of a 2-4 decoder is shown below: architecture with_select of decoder is with a select z <= 0001 when 00, 0010 when 01, 0100 when 10, 1000 when 11, XXXX when others; end architecture with_select; Stuart Lawson Page 14 17/10/2001

15 library ieee, basic; use work.numeric_std.all; use work.mnemonics.all; use basic.regs_pkg.all; --Following added for Warp to find entities in basic library use basic.ureg; entity ram_regs is port ( clk, rst: in std_logic; a, b: in unsigned(3 downto 0); f: in unsigned(3 downto 0); dest_ctl: in std_logic_vector(2 downto 0); ram0, ram3: inout std_logic; ad, bd: buffer unsigned(3 downto 0)); end ram_regs; architecture ram_regs of ram_regs is signal ram_en: std_logic; signal data: unsigned(3 downto 0); signal en: std_logic_vector(15 downto 0); type ram_array is array (15 downto 0) of unsigned(3 downto 0); signal ab_data: ram_array; -- define register array: gen: for i in 15 downto 0 generate ram: ureg generic map (4) port map (clk, rst, en(i), data, ab_data(i)); end generate; -- decode b to determine which register is enabled: with dest_ctl select ram_en <= '0' when qreg nop, '1' when others; decode_b: process (b) for i in 0 to 15 loop if to_integer(b) = i then en(i) <= ram_en; else en(i) <= '0'; end loop; end process; -- define data input to register array: with dest_ctl select data <= (f(2), f(1), f(0), ram0) when ramqu ramu, -- shift-up (ram3, f(3), f(2), f(1)) when ramqd ramd, -- shift-down f when rama ramf, Stuart Lawson Page 15 17/10/2001

16 "----" when others; -- define reg_array output for a and b regs: ad <= ab_data(to_integer(a)); bd <= ab_data(to_integer(b)); -- define ram0 and ram3 inouts: ram3 <= f(3) when (dest_ctl = ramu or dest_ctl = ramqu) else 'Z'; ram0 <= f(0) when (dest_ctl = ramd or dest_ctl = ramqd) else 'Z'; end ram_regs; Q-register Figure 4: Architecture of Register File To implement the Q-register we use the component ureg from the basic library. The register has a shifter on its input data lines and a decoder for the relevant part of the microinstruction. Its architecture is shown in Figure 5. Stuart Lawson Page 16 17/10/2001

17 Figure 5: Architecture of Q register library ieee, basic; use work.numeric_std.all; use work.mnemonics.all; use basic.regs_pkg.all; --Following added for Warp to find entities in basic library use basic.ureg; entity q_reg is port( clk, rst: in std_logic; f: in unsigned(3 downto 0); dest_ctl: in std_logic_vector(2 downto 0); qs0, qs3: inout std_logic; q: buffer unsigned(3 downto 0)); end q_reg; architecture q_reg of q_reg is signal q_en: std_logic; signal data: unsigned(3 downto 0); -- define q register: u1: ureg generic map (4) port map(clk, rst, q_en, data, q); -- define q_en: with dest_ctl select Stuart Lawson Page 17 17/10/2001

18 q_en <= '1' when qreg ramqd ramqu, '0' when others; -- define data input to q register: with dest_ctl select data <= (f(2), f(1), f(0), qs0) when ramqu, -- shift-up (qs3, f(3), f(2), f(1)) when ramqd, -- shift-down f when qreg, "----" when others; -- define q0 and q3 inouts: qs3 <= f(3) when (dest_ctl = ramu or dest_ctl = ramqu) else 'Z'; qs0 <= f(0) when (dest_ctl = ramd or dest_ctl = ramqd) else 'Z'; end q_reg; Source operand selector, SRC_OP Source operands are chosen from a number of sources by the use of multiplexers. The microinstruction reserves 4 bits for the various options (see Table 1). The architecture is shown in Figure 6. Figure 6: Architecture of source operand selector use work.numeric_std.all; use work.mnemonics.all; entity src_op is port( d, ad, bd, q: in unsigned(3 downto 0); src_ctl: in std_logic_vector(2 downto 0); r, s: buffer unsigned(3 downto 0)); Stuart Lawson Page 18 17/10/2001

19 end src_op; architecture src_op of src_op is -- decode alu operand r: with src_ctl select r <= ad when aq ab, "0000" when zq zb za, d when others; with src_ctl select s <= q when aq zq dq, bd when ab zb, ad when za da, "0000" when others; end src_op; Arithmetic and Logic Unit (ALU) The ALU is defined by the function table of Table 2. It has two source operands, one output all four bits wide together with several single bit inputs and outputs to aid cascading of chips such as carry -in and carry -out for ripple carry addition and g, p for carry look -ahead addition. Three bits of each microinstruction is allocated to select the ALU function. Note that before the ALU operation is performed, the input operands are extended by one bit to accommodate carry and overflow operations. use work.numeric_std.all; use work.mnemonics.all; entity alu is port ( r, s: in unsigned(3 downto 0); c_n: in std_logic; alu_ctl: in std_logic_vector(2 downto 0); f: buffer unsigned(3 downto 0); g_bar, p_bar: buffer std_logic; c_n4: buffer std_logic; ovr: buffer std_logic); end alu; architecture alu of alu is signal r1, s1, f1: unsigned(4 downto 0); r1 <= ('0', r(3), r(2), r(1), r(0)); s1 <= ('0', s(3), s(2), s(1), s(0)); alu: process (r1, s1, c_n, alu_ctl) case alu_ctl is when add => if c_n = '0' then f1 <= r1 + s1; Stuart Lawson Page 19 17/10/2001

20 else f1 <= r1 + s1 + 1; when subr => -- subtraction same as 2's comp addn if c_n = '0' then f1 <= r1 + not(s1); else f1 <= r1 + not(s1) + 1; when subs => if c_n = '0' then f1 <= s1 + not(r1) + 1; else f1 <= s1 + r1; when orrs => f1 <= r1 or s1; when andrs => f1 <= r1 and s1; when notrs => f1 <= not r1 and s1; when exor => f1 <= r1 xor s1; when exnor => f1 <= not( r1 xor s1); when others => f1 <= "-----"; end case; end process; f <= f1(3 downto 0); c_n4 <= f1(4); g_bar <= not ( (r(3) and s(3)) or ((r(3) or s(3)) and (r(2) and s(2))) or ((r(3) or s(3)) and (r(2) or s(2)) and (r(1) and s(1))) or ((r(3) or s(3)) and (r(2) or s(2)) and (r(1) or s(1)) and (r(0) and s(0)))); p_bar <= not ( (r(3) or s(3)) and (r(2) or s(2)) and (r(1) and s(1)) and (r(0) and s(0))); ovr <= '1' when (f1(4) /= f1(3)) else '0'; end alu; The output multiplexer (OUT_MUX) Finally a 2-1 multiplexer is design ed. Its inputs are the ALU output and the from the register file. Its VHDL code is the simplest of all the building blocks. ad data output use work.numeric_std.all; use work.mnemonics.all; entity out_mux is port( ad, f: in unsigned(3 downto 0); dest_ctl: in std_logic_vector(2 downto 0); oe: in std_logic; y: buffer unsigned(3 downto 0)); Stuart Lawson Page 20 17/10/2001

21 end out_mux; architecture out_mux of out_mux is signal y_int: unsigned(3 downto 0); y_int <= ad when dest_ctl = rama else f; y <= y_int when oe = '0' else "ZZZZ"; end out_mux; -- output before tri-state buffer Note that the output multiplexer has a tri -state output that is controlled by the output enable, oe. Top level of Am2901 We can now connect the Am2901 building blocks together to complete the design. In the final bit of VHDL code we need first to have a component declaration for each of the five building blocks thus: use work.numeric_std.all; package am2901_comps is component ram_regs port ( clk, rst: in std_logic; a, b: in unsigned(3 downto 0); f: in unsigned(3 downto 0); dest_ctl: in std_logic_vector(2 downto 0); ram0, ram3: inout std_logic; ad, bd: buffer unsigned(3 downto 0)); component q_reg port( clk, rst: in std_logic; f: in unsigned(3 downto 0); dest_ctl: in std_logic_vector(2 downto 0); qs0, qs3: inout std_logic; q: buffer unsigned(3 downto 0)); component src_op port( d, ad, bd, q: in unsigned(3 downto 0); src_ctl: in std_logic_vector(2 downto 0); r, s: buffer unsigned(3 downto 0)); component alu port ( r, s: in unsigned(3 downto 0); c_n: in std_logic; alu_ctl: in std_logic_vector(2 downto 0); f: buffer unsigned(3 downto 0); g_bar, p_bar: buffer std_logic; c_n4: buffer std_logic; Stuart Lawson Page 21 17/10/2001

22 ovr: buffer std_logic); component out_mux port( ad, f: in unsigned(3 downto 0); dest_ctl: in std_logic_vector(2 downto 0); oe: in std_logic; y: buffer unsigned(3 downto 0)); end am2901_comps; Finally we can instantiate each of the five building blocks, effectively connecting together as in Figures 1 and 2. use work.numeric_std.all; use work.am2901_comps.all; entity am2901 is port( clk, rst: in std_logic; a, b: in unsigned(3 downto 0); -- address inputs d: in unsigned(3 downto 0); -- direct data i: in std_logic_vector(8 downto 0); -- micro instruction c_n: in std_logic; -- carry in oe: in std_logic; -- output enable ram0, ram3: inout std_logic; -- shift lines to ram qs0, qs3: inout std_logic; -- shift lines to q y: buffer unsigned(3 downto 0); -- data outputs (3-state) g_bar,p_bar: buffer std_logic; -- carry generate, propagate ovr: buffer std_logic; -- overflow c_n4: buffer std_logic; -- carry out f_0: buffer std_logic; -- f = 0 f3: buffer std_logic); -- f(3) w/o 3-state end am2901; architecture am2901 of am2901 is alias dest_ctl: std_logic_vector(2 downto 0) is i(8 downto 6); alias alu_ctl: std_logic_vector(2 downto 0) is i(5 downto 3); alias src_ctl: std_logic_vector(2 downto 0) is i(2 downto 0); signal ad, bd: unsigned(3 downto 0); signal q: unsigned(3 downto 0); signal r, s: unsigned(3 downto 0); signal f: unsigned(3 downto 0); -- instantiate and connect components u1: ram_regs port map(clk => clk, rst => rst, a => a, b => b, f => f, dest_ctl => dest_ctl, ram0 => ram0, ram3 => ram3, ad => ad, bd => bd); u2: q_reg port map(clk => clk, rst => rst, f => f, dest_ctl => dest_ctl, qs0 => qs0, qs3 => qs3, q => q); Stuart Lawson Page 22 17/10/2001

23 u3: src_op port map(d => d, ad => ad, bd => bd, q => q, src_ctl => src_ctl, r => r, s => s); u4: alu port map(r => r, s => s, c_n => c_n, alu_ctl => alu_ctl, f => f, g_bar => g_bar, p_bar => p_bar, c_n4 => c_n4, ovr => ovr); u5: out_mux port map(ad => ad, f => f, dest_ctl => dest_ctl, oe => oe, y => y); -- define f_0 and f3 outputs f_0 <= '0' when f = "0000" else 'Z'; f3 <= f(3); end am2901; Note that f_0 is an open collector output so it will need an external pull -up resistor. This enables several similar outputs from cascaded chips to be wired together without external gates. The VHDL source code for the Am2901 can be found in warp\examples\vhdlbook\ch6. Stuart Lawson Page 23 17/10/2001

EITF35: Introduction to Structured VLSI Design

EITF35: Introduction to Structured VLSI Design EITF35: Introduction to Structured VLSI Design Part 2.2.2: VHDL-3 Liang Liu liang.liu@eit.lth.se 1 Outline Inference of Basic Storage Element Some Design Examples DFF with enable Counter Coding Style:

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

8-1. Fig. 8-1 ASM Chart Elements 2001 Prentice Hall, Inc. M. Morris Mano & Charles R. Kime LOGIC AND COMPUTER DESIGN FUNDAMENTALS, 2e, Updated.

8-1. Fig. 8-1 ASM Chart Elements 2001 Prentice Hall, Inc. M. Morris Mano & Charles R. Kime LOGIC AND COMPUTER DESIGN FUNDAMENTALS, 2e, Updated. 8-1 Name Binary code IDLE 000 Register operation or output R 0 RUN 0 1 Condition (a) State box (b) Example of state box (c) Decision box IDLE R 0 From decision box 0 1 START Register operation or output

More information

ELCT 501: Digital System Design

ELCT 501: Digital System Design ELCT 501: Digital System Lecture 4: CAD tools (Continued) Dr. Mohamed Abd El Ghany, Basic VHDL Concept Via an Example Problem: write VHDL code for 1-bit adder 4-bit adder 2 1-bit adder Inputs: A (1 bit)

More information

EITF35: Introduction to Structured VLSI Design

EITF35: Introduction to Structured VLSI Design EITF35: Introduction to Structured VLSI Design Part 2.2.2: VHDL-3 Liang Liu liang.liu@eit.lth.se 1 Outline Inference of Basic Storage Element Some Design Examples DFF with enable Counter Coding Style:

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

Lattice VHDL Training

Lattice VHDL Training Lattice Part I February 2000 1 VHDL Basic Modeling Structure February 2000 2 VHDL Design Description VHDL language describes a digital system as a set of modular blocks. Each modular block is described

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

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

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

VHDL for Complex Designs

VHDL for Complex Designs ELEC 379 : DESIGN OF DIGITAL AND MICROCOMPUTER SYSTEMS 1998/99 WINTER SESSION, TERM 2 VHDL for Complex Designs This lecture covers VHDL features that are useful when designing complex logic circuits. After

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

Writing VHDL for RTL Synthesis

Writing VHDL for RTL Synthesis Writing VHDL for RTL Synthesis Stephen A. Edwards, Columbia University December 21, 2009 The name VHDL is representative of the language itself: it is a two-level acronym that stands for VHSIC Hardware

More information

Introduction to VHDL #1

Introduction to VHDL #1 ECE 3220 Digital Design with VHDL Introduction to VHDL #1 Lecture 3 Introduction to VHDL The two Hardware Description Languages that are most often used in industry are: n VHDL n Verilog you will learn

More information

Topics. Midterm Finish Chapter 7

Topics. Midterm Finish Chapter 7 Lecture 9 Topics Midterm Finish Chapter 7 Xilinx FPGAs Chapter 7 Spartan 3E Architecture Source: Spartan-3E FPGA Family Datasheet CLB Configurable Logic Blocks Each CLB contains four slices Each slice

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

IT T35 Digital system desigm y - ii /s - iii

IT T35 Digital system desigm y - ii /s - iii UNIT - V Introduction to Verilog Hardware Description Language Introduction HDL for combinational circuits Sequential circuits Registers and counters HDL description for binary multiplier. 5.1 INTRODUCTION

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

Using Library Modules in VHDL Designs

Using Library Modules in VHDL Designs Using Library Modules in VHDL Designs This tutorial explains how Altera s library modules can be included in VHDL-based designs, which are implemented by using the Quartus R II software. Contents: Example

More information

8-1. Fig. 8-1 ASM Chart Elements 2001 Prentice Hall, Inc. M. Morris Mano & Charles R. Kime LOGIC AND COMPUTER DESIGN FUNDAMENTALS, 2e, Updated.

8-1. Fig. 8-1 ASM Chart Elements 2001 Prentice Hall, Inc. M. Morris Mano & Charles R. Kime LOGIC AND COMPUTER DESIGN FUNDAMENTALS, 2e, Updated. 8-1 Name Binary code IDLE 000 Register operation or output R 0 RUN Condition (a) State box (b) Example of state box (c) Decision box IDLE R 0 From decision box START Register operation or output PC 0 (d)

More information

Using Library Modules in VHDL Designs

Using Library Modules in VHDL Designs Using Library Modules in VHDL Designs This tutorial explains how Altera s library modules can be included in VHDL-based designs, which are implemented by using the Quartus R II software. Contents: Example

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

Using Library Modules in VHDL Designs. 1 Introduction. For Quartus II 12.1

Using Library Modules in VHDL Designs. 1 Introduction. For Quartus II 12.1 Using Library Modules in VHDL Designs For Quartus II 12.1 1 Introduction This tutorial explains how Altera s library modules can be included in VHDL-based designs, which are implemented by using the Quartus

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

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

ECE 545 Lecture 8. Data Flow Description of Combinational-Circuit Building Blocks. George Mason University

ECE 545 Lecture 8. Data Flow Description of Combinational-Circuit Building Blocks. George Mason University ECE 545 Lecture 8 Data Flow Description of Combinational-Circuit Building Blocks George Mason University Required reading P. Chu, RTL Hardware Design using VHDL Chapter 7, Combinational Circuit Design:

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

[VARIABLE declaration] BEGIN. sequential statements

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

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

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

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

MCPU - A Minimal 8Bit CPU in a 32 Macrocell CPLD.

MCPU - A Minimal 8Bit CPU in a 32 Macrocell CPLD. MCPU - A Minimal 8Bit CPU in a 32 Macrocell CPLD. Tim Böscke, cpldcpu@opencores.org 02/2001 - Revised 10/2004 This documents describes a successful attempt to fit a simple VHDL - CPU into a 32 macrocell

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

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

Control Unit: Binary Multiplier. Arturo Díaz-Pérez Departamento de Computación Laboratorio de Tecnologías de Información CINVESTAV-IPN

Control Unit: Binary Multiplier. Arturo Díaz-Pérez Departamento de Computación Laboratorio de Tecnologías de Información CINVESTAV-IPN Control Unit: Binary Multiplier Arturo Díaz-Pérez Departamento de Computación Laboratorio de Tecnologías de Información CINVESTAV-IPN Example: Binary Multiplier Two versions Hardwired control Microprogrammed

More information

The University of Alabama in Huntsville ECE Department CPE Midterm Exam Solution March 2, 2006

The University of Alabama in Huntsville ECE Department CPE Midterm Exam Solution March 2, 2006 The University of Alabama in Huntsville ECE Department CPE 526 01 Midterm Exam Solution March 2, 2006 1. (15 points) A barrel shifter is a shift register in which the data can be shifted either by one

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

Lecture 9. VHDL, part IV. Hierarchical and parameterized design. Section 1 HIERARCHICAL DESIGN

Lecture 9. VHDL, part IV. Hierarchical and parameterized design. Section 1 HIERARCHICAL DESIGN Lecture 9 VHDL, part IV Hierarchical and parameterized design Section 1 HIERARCHICAL DESIGN 2 1 Dealing with Large Digital System Design 1. Apply hierarchy to the design At the highest level use larger

More information

Computer-Aided Digital System Design VHDL

Computer-Aided Digital System Design VHDL بس م اهلل الر حم ن الر حی م Iran University of Science and Technology Department of Computer Engineering Computer-Aided Digital System Design VHDL Ramin Rajaei ramin_rajaei@ee.sharif.edu Modeling Styles

More information

CAD4 The ALU Fall 2009 Assignment. Description

CAD4 The ALU Fall 2009 Assignment. Description CAD4 The ALU Fall 2009 Assignment To design a 16-bit ALU which will be used in the datapath of the microprocessor. This ALU must support two s complement arithmetic and the instructions in the baseline

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

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

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

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

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

Department of Electronics & Communication Engineering Lab Manual E-CAD Lab

Department of Electronics & Communication Engineering Lab Manual E-CAD Lab Department of Electronics & Communication Engineering Lab Manual E-CAD Lab Prasad V. Potluri Siddhartha Institute of Technology (Sponsored by: Siddhartha Academy of General & Technical Education) Affiliated

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

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

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

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

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

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

SRI SUKHMANI INSTITUTE OF ENGINEERING AND TECHNOLOGY, DERA BASSI (MOHALI)

SRI SUKHMANI INSTITUTE OF ENGINEERING AND TECHNOLOGY, DERA BASSI (MOHALI) SRI SUKHMANI INSTITUTE OF ENGINEERING AND TECHNOLOGY, DERA BASSI (MOHALI) VLSI LAB MANUAL ECE DEPARTMENT Introduction to VHDL It is a hardware description language that can be used to model a digital system

More information

10 Writing Circuit Descriptions

10 Writing Circuit Descriptions 10 Writing Circuit Descriptions You can generally use several different, but logically equivalent, VHDL descriptions to describe a circuit. To understand the interaction between VHDL Compiler and Design

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

VHDL in 1h. Martin Schöberl

VHDL in 1h. Martin Schöberl VHDL in 1h Martin Schöberl VHDL /= C, Java, Think in hardware All constructs run concurrent Different from software programming Forget the simulation explanation VHDL is complex We use only a small subset

More information

Verilog Design Principles

Verilog Design Principles 16 h7fex // 16-bit value, low order 4 bits unknown 8 bxx001100 // 8-bit value, most significant 2 bits unknown. 8 hzz // 8-bit value, all bits high impedance. Verilog Design Principles ECGR2181 Extra Notes

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

INTRODUCTION TO VHDL ADVANCED COMPUTER ARCHITECTURES. Slides by: Pedro Tomás. Additional reading: - ARQUITECTURAS AVANÇADAS DE COMPUTADORES (AAC)

INTRODUCTION TO VHDL ADVANCED COMPUTER ARCHITECTURES. Slides by: Pedro Tomás. Additional reading: - ARQUITECTURAS AVANÇADAS DE COMPUTADORES (AAC) INTRODUCTION TO VHDL Slides by: Pedro Tomás Additional reading: - ADVANCED COMPUTER ARCHITECTURES ARQUITECTURAS AVANÇADAS DE COMPUTADORES (AAC) Outline 2 Hardware Description Languages (HDL) VHDL Very

More information

Lecture 4: Modeling in VHDL (Continued ) EE 3610 Digital Systems

Lecture 4: Modeling in VHDL (Continued ) EE 3610 Digital Systems EE 3610: Digital Systems 1 Lecture 4: Modeling in VHDL (Continued ) Sequential Statements Use Process process (sensitivity list) variable/constant declarations Sequential Statements end process; 2 Sequential

More information

BUILDING BLOCKS OF A BASIC MICROPROCESSOR. Part 1 PowerPoint Format of Lecture 3 of Book

BUILDING BLOCKS OF A BASIC MICROPROCESSOR. Part 1 PowerPoint Format of Lecture 3 of Book BUILDING BLOCKS OF A BASIC MICROPROCESSOR Part PowerPoint Format of Lecture 3 of Book Decoder Tri-state device Full adder, full subtractor Arithmetic Logic Unit (ALU) Memories Example showing how to write

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

!"#$%&&"'(')"*+"%,%-".#"'/"'.001$$"

!#$%&&'(')*+%,%-.#'/'.001$$ !"#$%&&"'(')"*+"%,%-".#"'/"'.001$$"!!"#$%&'#()#*+"+#,-."/0110#230#4."50",+"+#)6# 6+-+#(.6+-0#)4475.8)60#0/#.65-0#230#9+**+"+# 2.48).-0#(.6+-0#! 2+"*5."5*:#,."/0110#;)**0! *),".6*:#-.99-0*0"5."+#2+660,.40"5)#;)*)2)#

More information

ECOM 4311 Digital Systems Design

ECOM 4311 Digital Systems Design ECOM 4311 Digital Systems Design Eng. Monther Abusultan Computer Engineering Dept. Islamic University of Gaza Page 1 Agenda 1. Counters Page 2 Counters - special name of any clocked sequential circuit

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

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

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

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

Digital Circuit Design and Language. Datapath Design. Chang, Ik Joon Kyunghee University

Digital Circuit Design and Language. Datapath Design. Chang, Ik Joon Kyunghee University Digital Circuit Design and Language Datapath Design Chang, Ik Joon Kyunghee University Typical Synchronous Design + Control Section : Finite State Machine + Data Section: Adder, Multiplier, Shift Register

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

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

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

Test Benches - Module 8

Test Benches - Module 8 Test Benches Module 8 Jim Duckworth, WPI 1 Overview We have concentrated on VHDL for synthesis Can also use VHDL as a test language Very important to conduct comprehensive verification on your design To

More information

1. INTRODUCTION TO MICROPROCESSOR AND MICROCOMPUTER ARCHITECTURE:

1. INTRODUCTION TO MICROPROCESSOR AND MICROCOMPUTER ARCHITECTURE: 1. INTRODUCTION TO MICROPROCESSOR AND MICROCOMPUTER ARCHITECTURE: A microprocessor is a programmable electronics chip that has computing and decision making capabilities similar to central processing unit

More information

Pollard s Tutorial on Clocked Stuff in VHDL

Pollard s Tutorial on Clocked Stuff in VHDL Pollard s Tutorial on Clocked Stuff in VHDL Welcome to a biased view of how to do register type of stuff in VHDL. The object of this short note is to identify one way to easily handle registered logic

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

ECE 4514 Digital Design II. Spring Lecture 7: Dataflow Modeling

ECE 4514 Digital Design II. Spring Lecture 7: Dataflow Modeling ECE 4514 Digital Design II Lecture 7: Dataflow Modeling A language Lecture Today's topic Dataflow Modeling input input input module output output Model with submodules and gates = Structural Model with

More information

PESIT Bangalore South Campus

PESIT Bangalore South Campus INTERNAL ASSESSMENT TEST III Date : 21/11/2017 Max Marks : 40 Subject & Code : Computer Organization (15CS34) Semester : III (A & B) Name of the faculty: Mrs. Sharmila Banu Time : 11.30 am 1.00 pm Answer

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

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

COVER SHEET: Total: Regrade Info: 2 (6 points) 3 (8 points) 4 (10 points) 8 (12 points) 6 (6 points) 7 (6 points) 9 (30 points) 10 (4 points)

COVER SHEET: Total: Regrade Info: 2 (6 points) 3 (8 points) 4 (10 points) 8 (12 points) 6 (6 points) 7 (6 points) 9 (30 points) 10 (4 points) EEL 4712 Midterm 2 Spring 2010 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

VHDL: Code Structure. 1

VHDL: Code Structure. 1 VHDL: Code Structure talarico@gonzaga.edu 1 Mo:va:on for HDL- based design Standard Technology/vendor independent Portable and Reusable talarico@gonzaga.edu 2 Altera s Design Flow (RTL) RTL Generic Boolean

More information

Lecture 15: System Modeling and Verilog

Lecture 15: System Modeling and Verilog Lecture 15: System Modeling and Verilog Slides courtesy of Deming Chen Intro. VLSI System Design Outline Outline Modeling Digital Systems Introduction to Verilog HDL Use of Verilog HDL in Synthesis Reading

More information

Am2901 Completion and Integration with Am9080a

Am2901 Completion and Integration with Am9080a Am2901 Completion and Integration with Am9080a A. Objectives Written By Kurt English This laboratory assignment is an introduction to the Verilog Hardware Description Language, which will be used to complete

More information

The University of Alabama in Huntsville ECE Department CPE Final Exam Solution Spring 2004

The University of Alabama in Huntsville ECE Department CPE Final Exam Solution Spring 2004 The University of Alabama in Huntsville ECE Department CPE 526 01 Final Exam Solution Spring 2004 1. (15 points) An old Thunderbird car has three left and three right tail lights, which flash in unique

More information

6.111 Lecture # 11. Handshaking. Topics for today: Required when multiple lines of input are involved

6.111 Lecture # 11. Handshaking. Topics for today: Required when multiple lines of input are involved 6.111 Lecture # 11 Topics for today: Handshaking 'Concurrent' and 'Sequential' statements (Another example: a counter) Yet another example: a small ALU Brief discussion of resource usage Handshaking Required

More information

Lecture 4. VHDL Fundamentals. George Mason University

Lecture 4. VHDL Fundamentals. George Mason University Lecture 4 VHDL Fundamentals George Mason University Required reading P. Chu, RTL Hardware Design using VHDL Chapter 3, Basic Language Constructs of VHDL 2 Design Entity ECE 448 FPGA and ASIC Design with

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

Verilog. Verilog for Synthesis

Verilog. Verilog for Synthesis Verilog Verilog for Synthesis 1 Verilog background 1983: Gateway Design Automation released Verilog HDL Verilog and simulator 1985: Verilog enhanced version Verilog-XL 1987: Verilog-XL becoming more popular

More information

REGISTER TRANSFER LANGUAGE

REGISTER TRANSFER LANGUAGE REGISTER TRANSFER LANGUAGE The operations executed on the data stored in the registers are called micro operations. Classifications of micro operations Register transfer micro operations Arithmetic micro

More information

ECE 341 Midterm Exam

ECE 341 Midterm Exam ECE 341 Midterm Exam Time allowed: 75 minutes Total Points: 75 Points Scored: Name: Problem No. 1 (8 points) For each of the following statements, indicate whether the statement is TRUE or FALSE: (a) A

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

Midterm Exam Thursday, October 24, :00--2:15PM (75 minutes)

Midterm Exam Thursday, October 24, :00--2:15PM (75 minutes) Last (family) name: Answer Key First (given) name: Student I.D. #: Department of Electrical and Computer Engineering University of Wisconsin - Madison ECE 551 Digital System Design and Synthesis Midterm

More information

Digital Design (VIMIAA01) Introduction to the Verilog HDL

Digital Design (VIMIAA01) Introduction to the Verilog HDL BUDAPEST UNIVERSITY OF TECHNOLOGY AND ECONOMICS FACULTY OF ELECTRICAL ENGINEERING AND INFORMATICS DEPARTMENT OF MEASUREMENT AND INFORMATION SYSTEMS Digital Design (VIMIAA01) Introduction to the Verilog

More information

VHDL. Official Definition: VHSIC Hardware Description Language VHISC Very High Speed Integrated Circuit

VHDL. Official Definition: VHSIC Hardware Description Language VHISC Very High Speed Integrated Circuit VHDL VHDL Official Definition: VHSIC Hardware Description Language VHISC Very High Speed Integrated Circuit VHDL Alternative (Student Generated) Definition Very Hard Digital Logic language VHDL Design

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

Concurrent & Sequential Stmts. (Review)

Concurrent & Sequential Stmts. (Review) VHDL Introduction, Part II Figures in this lecture are from: Rapid Prototyping of Digital Systems, Second Edition James O. Hamblen & Michael D. Furman, Kluwer Academic Publishers, 2001, ISBN 0-7923-7439-

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

Basic Processing Unit: Some Fundamental Concepts, Execution of a. Complete Instruction, Multiple Bus Organization, Hard-wired Control,

Basic Processing Unit: Some Fundamental Concepts, Execution of a. Complete Instruction, Multiple Bus Organization, Hard-wired Control, UNIT - 7 Basic Processing Unit: Some Fundamental Concepts, Execution of a Complete Instruction, Multiple Bus Organization, Hard-wired Control, Microprogrammed Control Page 178 UNIT - 7 BASIC PROCESSING

More information