jincyjohnson
Member level 4
I have an array variable 'choice'. It stores an array of 8 bit elements. I want to transfer each 8 bit element to another variable 'vector' in each clock transfer. This is repeated until the count 'ctt1' becomes 17. But in each transfer only first 4 bits are transferred and remaining 4 are uuuu.
eg: choice=[00000001, 01010101, 11110000, 10001111]
here i get the output as
1st clk; vector<=0000uuuu
2nd clk; vector<=0101uuuu
3rd clk; vector<=1111uuuu
4th clk; vector<=1000uuuu
the coding is written as
process(ready,chain)
variable ctt1:integer:=0;
begin
if ready='1' then
ctt1:=ctt1+1;
if ctt1<17 then
vector(0 to 7)<=chain(ctt1-1);
end if;
end if;
end process;
plz reply
eg: choice=[00000001, 01010101, 11110000, 10001111]
here i get the output as
1st clk; vector<=0000uuuu
2nd clk; vector<=0101uuuu
3rd clk; vector<=1111uuuu
4th clk; vector<=1000uuuu
the coding is written as
process(ready,chain)
variable ctt1:integer:=0;
begin
if ready='1' then
ctt1:=ctt1+1;
if ctt1<17 then
vector(0 to 7)<=chain(ctt1-1);
end if;
end if;
end process;
plz reply