I am having problem with selecting RAM lines with a integer signal and assigning them to somewhere else, I am familiar with verilog but I am unable to do the conversions.
I have tried the conversions like std_logic_vector(X) and others like to_integer but I am not able to do what I need to do, I put the errors in comments also PIAxonSpikes and PISynapticConnect is input and SAxonCount is a integer signal. I provided the snippet please
Verilog version that works perfectly,
PONeuronWregEn <= PIAxonSpikes[SAxonCount] & PISynaptiConnect[SAxonCount];
if (PIAxonSpikes[SAxonCount] && PISynaptiConnect[SAxonCount])
PONeuronInfo <= PONeuronInfo [SAxonCount];
else
POWrPotential <= 1;
VHDL I want to do but I cannot, please help me with conversion of this verilog to VHDL
PIAxonSpikes : in std_logic_vector(PARAMNumberofAxons - 1 downto 0);
PISynaptiConnect : in std_logic_vector(PARAMNumberofAxons - 1 downto 0);
--these are inputs
signal SAxonCount : integer range 0 to (clogb2(PARAMNumberofAxons));
when StWaitDataCSRAM =>
if PIAxonSpikes(SAxonCount) and PISynaptiConnect(SAxonCount) = '1' then
-- HERE I SEE A ERROR WHICH TELLS ME INDEXED NAME IS NOT A BOOLEAN
PONeuronInfo <= NeuronInformation(SAxonCount);
-- ERROR TYPE CONVERSION DOES NOT MATCH TYPE STD_LOGIC_VECTOR
else
-- if not then it writes the current potential so it sends the flag
POWrPotential <= '1';
end if;
when StSpikeProc =>
PONeuronWregEn <= PIAxonSpikes(SAxonCount) and (PISynaptiConnect(SAxonCount));
-- I want to and them bitwisely but I am not sure here it works bitwisely
PONeuronInfo <= NeuronInformation(SAxonCount);
-- ERROR TYPE CONVERSION DOES NOT MATCH TYPE STD_LOGIC_VECTOR
if SAxonCount = PARAMNumberofAxons - 1 then
StTokenController <= StIterateWrCSRAM;
else
StTokenController <= StSpikeProc;
end if;