Forum: FPGA, VHDL & Co. shift register


von puka1012 (Gast)


Lesenswert?

bit_out <=bit_out(30 downto 0) & '1';


kann jemand mir mit eine beispiele erklären was die oben zeile 
macht(besser waäre auf englisch).Danke

von Antti L. (xilant)


Lesenswert?

its part of code for shift register

von puka1012 (Gast)


Lesenswert?

can you please explain?

von Antti L. (xilant)


Lesenswert?

you should look at the FULL code, then it can be explained too

von Falk B. (falk)


Lesenswert?

bit_out <=bit_out(30 downto 0) & '1';

This is a simple signal assignemt. It takes the lower bits 30-0 of 
bit_out and concatenates it with the constant '1' at the lowest bit 
position. This is assigned to bit_out again. This is a logic shift left 
operation, which feeds a logic one into the LSB (least significant bit).
Another cumbersome way to describe it would be like this.

bit_out(31) <= bit_out(30);
bit_out(30) <= bit_out(29);
bit_out(29) <= bit_out(28);

...

bit_out(1) <= bit_out(0);
bit_out(0) <= '1';

von puka1012 (Gast)


Lesenswert?

Thank you

von Lothar M. (Firma: Titel) (lkmiller) (Moderator) Benutzerseite


Lesenswert?

The & operator is the concatenation operator. It connects bits and/or 
vectors to a new vector.

It is not the AND operator as in C.

Bitte melde dich an um einen Beitrag zu schreiben. Anmeldung ist kostenlos und dauert nur eine Minute.
Bestehender Account
Schon ein Account bei Google/GoogleMail? Keine Anmeldung erforderlich!
Mit Google-Account einloggen
Noch kein Account? Hier anmelden.