F
fl
Guest
Hi,
After I get helps from several on-line groups, I can calculate a CRC with a VHDL
project. The problem now is that I can get the 16-bit checksum in one time
calculation. Some real FPGA implementations use 8-bit. Thus, I guess that it needs
two clocks to get a 16-bit CRC checksum. My code originates from a function call,
which is a combination logic (no register), from on-line post. When I modify it to
get 8-bit one time for a 16-bit CRC checksum, I find that I have to store the
internal states for the next iterative CRC calculation (Is this right?)
The function call seems not work in this way (It only output the result, not the
internal states). The CRC problem is just like an integer division. I have to
store the residue and the new divisor (dividend is polynomial, constant in this
case). It looks like the residue must have attribute of 'in' and 'out'. In both
function and procedure, parameters can be set to 'in', 'out' or 'inout'.
I am new to VHDL function/procedure. They do not look like easy. Could you express
your idea to help me? Thanks,
After I get helps from several on-line groups, I can calculate a CRC with a VHDL
project. The problem now is that I can get the 16-bit checksum in one time
calculation. Some real FPGA implementations use 8-bit. Thus, I guess that it needs
two clocks to get a 16-bit CRC checksum. My code originates from a function call,
which is a combination logic (no register), from on-line post. When I modify it to
get 8-bit one time for a 16-bit CRC checksum, I find that I have to store the
internal states for the next iterative CRC calculation (Is this right?)
The function call seems not work in this way (It only output the result, not the
internal states). The CRC problem is just like an integer division. I have to
store the residue and the new divisor (dividend is polynomial, constant in this
case). It looks like the residue must have attribute of 'in' and 'out'. In both
function and procedure, parameters can be set to 'in', 'out' or 'inout'.
I am new to VHDL function/procedure. They do not look like easy. Could you express
your idea to help me? Thanks,