edhunter2003
Technical User
Hi all,
I need some help with this. I have an entity that looks like this
I need to take dinLen number of bits of din and store them on a buffer, when valid is high. Then when go is set high, I send out the first 8 bits of the buffer, and then the next 8, until all the bits that were placed on the buffer are sent to dout.
For example, on the first clock tick when valid = '1'
Then the next clock tick when valid = '1'
Then if go goes high, I want dout to be
Any idea of how to do this?
Thanks all.
I need some help with this. I have an entity that looks like this
Code:
entity test is port(
clk, rst, valid, go: in std_logic;
din: in std_logic_vector(25 downto 0);
dinLen: in std_logic_vector(4 downto 0);
dout: out std_logic_vector(7 downto 0);
rdy, end: out std_logic);
end entity test;
I need to take dinLen number of bits of din and store them on a buffer, when valid is high. Then when go is set high, I send out the first 8 bits of the buffer, and then the next 8, until all the bits that were placed on the buffer are sent to dout.
For example, on the first clock tick when valid = '1'
Code:
din = 11111000100100011100000000, dinLen = "10010" (18)
Code:
din = 10110010010000000000000000, dinLen = "1011" (11)
Code:
"11111000"
"10010001"
"11101100"
Any idea of how to do this?
Thanks all.