I
Indroneel Ganguly
Guest
Hello Group,
I am new to VHDL and would appreciate any pointers, or suggestions in this
problem.
I am trying to modify a shift register, when the LOAD pin is active(active
low signal)
, I load values into the shifter register's internal register with levels on
the Pins
and constant. So that on LOAD the shift register contains some input pin
values and
a internal string.
However when I try to do this (loading Pins and internal register) the pins
get loaded
as zeros.
The shift register works fine when I am using only pins or only internally
stored values.
Below is the code with the working variants commented out. It also contains
an output shift
register connected to the input shift register.
Hello,
I am new to VHDL and would appreciate any pointers, or suggestions in this
problem.
I am trying to modify a shift register, when the LOAD pin is active(active
low signal)
, I load values into the shifter register's internal register with levels on
the Pins
and constant. So that on LOAD the shift register contains some input pin
values and
a internal string.
However when I try to do this (loading Pins and internal register) the pins
get loaded
as zeros.
The shift register works fine when I am using only pins or only internally
stored values.
INP_BYTEx are input pins
DI2,DI1 are data out from the input and output of the shift registers
INPUT_SIZE = Size of shift register in bits -1
OUTPUT_SIZE = Size of shift register in bits -1
The CLK is not a periodic clock it is starts with a delay after LOAD.
Below is the code with the working variants commented out. It also contains
an output shift
register connected to the input shift register.
IF (LOAD_AL='0') THEN
internal_input(INPUT_SIZE DOWNTO 0) <= INP_BYTE0 & "11110101" &
INP_BYTE2 ; -- this doesnt work
-- These below work
-- internal_input(INPUT_SIZE DOWNTO 0) <= INP_BYTE0 & INP_BYTE1 &
INP_BYTE2;
-- internal_input(INPUT_SIZE DOWNTO 0) <= "11110101" & "11111111" &
"00000000";
ELSIF Rising_Edge(CLK) THEN
internal_output <= internal_output(OUTPUT_SIZE-1 DOWNTO 0) & SSC_DO;
internal_input <= internal_input(INPUT_SIZE-1 DOWNTO 0) &
internal_output(OUTPUT_SIZE);
END IF;
DI2 <= internal_input(INPUT_SIZE);
DI1 <= internal_output(OUTPUT_SIZE);
I would be very grateful for any suggestions or pointers as to what I am
overlooking.
My hunch is that a register is used and this is initialized to zero because
the INP_BYTEx and string are not available at the same time.
Is that correct, and how do I work around it.
Thanks in advance.
Indroneel
I am new to VHDL and would appreciate any pointers, or suggestions in this
problem.
I am trying to modify a shift register, when the LOAD pin is active(active
low signal)
, I load values into the shifter register's internal register with levels on
the Pins
and constant. So that on LOAD the shift register contains some input pin
values and
a internal string.
However when I try to do this (loading Pins and internal register) the pins
get loaded
as zeros.
The shift register works fine when I am using only pins or only internally
stored values.
Below is the code with the working variants commented out. It also contains
an output shift
register connected to the input shift register.
Hello,
I am new to VHDL and would appreciate any pointers, or suggestions in this
problem.
I am trying to modify a shift register, when the LOAD pin is active(active
low signal)
, I load values into the shifter register's internal register with levels on
the Pins
and constant. So that on LOAD the shift register contains some input pin
values and
a internal string.
However when I try to do this (loading Pins and internal register) the pins
get loaded
as zeros.
The shift register works fine when I am using only pins or only internally
stored values.
INP_BYTEx are input pins
DI2,DI1 are data out from the input and output of the shift registers
INPUT_SIZE = Size of shift register in bits -1
OUTPUT_SIZE = Size of shift register in bits -1
The CLK is not a periodic clock it is starts with a delay after LOAD.
Below is the code with the working variants commented out. It also contains
an output shift
register connected to the input shift register.
IF (LOAD_AL='0') THEN
internal_input(INPUT_SIZE DOWNTO 0) <= INP_BYTE0 & "11110101" &
INP_BYTE2 ; -- this doesnt work
-- These below work
-- internal_input(INPUT_SIZE DOWNTO 0) <= INP_BYTE0 & INP_BYTE1 &
INP_BYTE2;
-- internal_input(INPUT_SIZE DOWNTO 0) <= "11110101" & "11111111" &
"00000000";
ELSIF Rising_Edge(CLK) THEN
internal_output <= internal_output(OUTPUT_SIZE-1 DOWNTO 0) & SSC_DO;
internal_input <= internal_input(INPUT_SIZE-1 DOWNTO 0) &
internal_output(OUTPUT_SIZE);
END IF;
DI2 <= internal_input(INPUT_SIZE);
DI1 <= internal_output(OUTPUT_SIZE);
I would be very grateful for any suggestions or pointers as to what I am
overlooking.
My hunch is that a register is used and this is initialized to zero because
the INP_BYTEx and string are not available at the same time.
Is that correct, and how do I work around it.
Thanks in advance.
Indroneel