







Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!








Fig 12. entity control_unit is generic ( Tpd_clk_out, Tpw_clk : delay_length; debug : boolean := false ); port ( clk : in bit; ready : in bit; control1, control2 : out bit ); end entity control_unit;
dut1 : entity work.control_unit generic map ( 200 ps, 1500 ps, false ) port map ( clk, ready, open, open ); dut2 : entity work.control_unit generic map ( Tpd_clk_out => 200 ps, Tpw_clk => 1500 ps ) port map ( clk, ready, open, open ); dut3 : entity work.control_unit generic map ( 200 ps, 1500 ps, debug => open ) port map ( clk, ready, open, open );
Fig 12. entity D_flipflop is generic ( Tpd_clk_q, Tsu_d_clk, Th_d_clk : delay_length ); port ( clk, d : in bit; q : out bit ); end entity D_flipflop;
architecture basic of D_flipflop is begin behavior : q <= d after Tpd_clk_q when clk = '1' and clk'event; check_setup : process is begin wait until clk = '1'; assert d'last_event >= Tsu_d_clk report "setup violation"; end process check_setup; check_hold : process is begin wait until clk'delayed(Th_d_clk) = '1'; assert d'delayed'last_event >= Th_d_clk report "hold violation"; end process check_hold; end architecture basic;
entity reg is generic ( width : positive ); port ( d : in bit_vector(0 to width - 1); q : out bit_vector(0 to width - 1); --... ); ….
architecture test of ch_12_03 is constant bus_size : positive := 16; signal in_data, out_data : bit_vector(0 to bus_size - 1); Begin … ok_reg : entity work.reg generic map ( width => bus_size ) port map ( d => in_data, q => out_data, --... ); … END .. Docsity.com
Fig 12. word_reg : entity work.reg(behavioral) generic map ( width => 32 ) port map ( --... );
subtype state_vector is bit_vector(1 to 5); state_reg : entity work.reg(behavioral) generic map ( width => state_vector'length ) port map ( --... );