ghattasak
Member level 1
- Joined
- Dec 31, 2012
- Messages
- 33
- Helped
- 0
- Reputation
- 0
- Reaction score
- 0
- Trophy points
- 1,286
- Activity points
- 1,595
hello there i have written the following in VHDL a code for a rotating registers should start with 1000 then rotate then 1 with each cycle 0100 0010 0001
the problem is i am not getting any output on the output bus
can anyone help?
the problem is i am not getting any output on the output bus
can anyone help?
Code VHDL - [expand] 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 entity writeren is generic (M: integer:=4); port( clk, reset: in std_logic; wr_en: in std_logic; wr_a: inout std_logic_vector(((M/2)+1) downto 0) ); end writeren; architecture loadreg of writeren is begin process (clk, reset) begin if (reset = '1') then wr_a(0)<='1'; wr_a((M/2)+1 downto 1)<=(others=>'0'); elsif (clk'event and clk = '1') then if (wr_en = '1') then wr_a(((M/2)+1) downto 0) <= wr_a(0) & wr_a((M/2)+1 downto 1); end if; end if; end process; end loadreg;
Last edited by a moderator: