oursriharsha
Member level 3
- Joined
- Apr 23, 2009
- Messages
- 54
- Helped
- 3
- Reputation
- 6
- Reaction score
- 0
- Trophy points
- 1,286
- Location
- Mumbai, India
- Activity points
- 1,622
hello ,
i have to read from a memory location say 10 x8 location , which i term as
Vector.
Can anyone suggest me an alternative way of reading those vector locations at some different counts.
say at every 120µs,125µs,130µs,220µs,225µs,250µs,...... at different 32 time slots.
for example in the code below ,
i have taken a vector with 8 locations and initialised them with different values.
clk is 1us /1Mhz .
is there any alternative for using that many no of if elsif loops .
As rightly said by one ouf our members here , this would seem a procedural language.
So please suggest some synthesiable alternative .
Would highly appreciate and points as well.
Regards
harsha
i have to read from a memory location say 10 x8 location , which i term as
Vector.
Can anyone suggest me an alternative way of reading those vector locations at some different counts.
say at every 120µs,125µs,130µs,220µs,225µs,250µs,...... at different 32 time slots.
for example in the code below ,
i have taken a vector with 8 locations and initialised them with different values.
clk is 1us /1Mhz .
is there any alternative for using that many no of if elsif loops .
As rightly said by one ouf our members here , this would seem a procedural language.
So please suggest some synthesiable alternative .
Would highly appreciate and points as well.
Code:
-----***** VECTOR INITIALIZATION *********** -----
VECTOR(0) <= "1001000001";
Vector(1) <= "0001000001";
VECTOR(2) <= "0000000000";
Vector(3) <= "0000000000";
VECTOR(4) <= "0000000000";
Vector(5) <= "0000111110";
VECTOR(6) <= "0001111111";
Vector(7) <= "0000000001";
--------------------------------------------------
process (CLK_SEQ ,CNTR_SEQ,RST_TOP,VECTOR(0),VECTOR(1),VECTOR(2),VECTOR(3),VECTOR(4))
begin
if ( RST_TOP = '0' ) then
CNTR_SEQ <= "00000000000";
elsif (RST_TOP ='1') then
if ( CLK_SEQ'event and CLK_SEQ ='1') then
--ALE_TOP<='1';
RW_SEQ <= TEMP_VECTOR(9);
STRB_SEQ <= TEMP_VECTOR(8 downto 6);
ADDR_SEQ <= TEMP_VECTOR(5 downto 0);
CNTR_SEQ<= CNTR_SEQ+1;
if ( CNTR_SEQ = "00001111000" ) then -- count of 120
TEMP_VECTOR <= VECTOR(0);
elsif (CNTR_SEQ ="00001111110") then -- count of 126
TEMP_VECTOR <= VECTOR(1);
elsif (CNTR_SEQ ="00010000010") then
TEMP_VECTOR <= VECTOR(2);
elsif (CNTR_SEQ ="00010000100") then
TEMP_VECTOR <= VECTOR(3);
elsif (CNTR_SEQ ="00011110000") then
CNTR_SEQ <= "00000000000";
end if;
end if ;
end if ;
if (RST_SEQ='0') then
DATABUS<= "00000000";
elsif (CLK_SEQ'event and CLK_SEQ ='1') then
if (RW_SEQ='0') then
DATABUS <= DATABUS_TEMP1;
end if ;-- rw_seq looop
end if;-- reset looop .
end process;
Regards
harsha