Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Hi all, I need some help with th

Status
Not open for further replies.

edhunter2003

Technical User
Oct 21, 2003
8
IE
Hi 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)
Then the next clock tick when valid = '1'
Code:
din = 10110010010000000000000000, dinLen = "1011" (11)
Then if go goes high, I want dout to be
Code:
  "11111000"
  "10010001"
  "11101100"

Any idea of how to do this?
Thanks all.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top