A
Amal
Guest
I often try to code as generic as possible so it can be reused across
multiple projects. When coding RAMs, ROMs or technology dependent
components, I pass a generic to select what target technology it is
going to be used. For ASIC, usually it is an instantiation of a hard
macro, and for FPGA I code so that the compiler can infer the proper
component.
For ROMs, the ASIC vendor ROM generator creates a text file that has
the contents of the ROM and the ROM model reads this file for
simulations. For FPGA I was forced to declare a constant array and
initialize it with the contents of the ROM. This way there is always
the danger or mismatch between the FPGA version and the ASIC version
of the ROM.
In VHDL and most languages, constants can be declared to call a
function that returns the proper constant value. If synthesis tools
allowed FILE I/O to be used in this context, then the same ROM file
that is generated by the ROM generator could be read in and passed to
the constant and the two implementations would be identical.
This would be a nice feature to have I think. I can think of other
scenarios that function calls and FILE I/O could be used in synthesis.
-- Amal
multiple projects. When coding RAMs, ROMs or technology dependent
components, I pass a generic to select what target technology it is
going to be used. For ASIC, usually it is an instantiation of a hard
macro, and for FPGA I code so that the compiler can infer the proper
component.
For ROMs, the ASIC vendor ROM generator creates a text file that has
the contents of the ROM and the ROM model reads this file for
simulations. For FPGA I was forced to declare a constant array and
initialize it with the contents of the ROM. This way there is always
the danger or mismatch between the FPGA version and the ASIC version
of the ROM.
In VHDL and most languages, constants can be declared to call a
function that returns the proper constant value. If synthesis tools
allowed FILE I/O to be used in this context, then the same ROM file
that is generated by the ROM generator could be read in and passed to
the constant and the two implementations would be identical.
This would be a nice feature to have I think. I can think of other
scenarios that function calls and FILE I/O could be used in synthesis.
-- Amal