Does VHDL contain functions like Verilog $readmemb and $readmemh?

Why OSVVM™? Forums VHDL Does VHDL contain functions like Verilog $readmemb and $readmemh?

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #2541
    Hassan
    Member

    Verilog/SystemVerilog (synthesis) has some functions that can read a file into a signal. These are $readmemb and $readmemh. These can both be used to easily create a ROM from file contents. As far as I know, VHDL does not contain anything along these lines that will work in synthesis. Is this true? If so, why is this so?

    #2542
    Jim Lewis
    Member

    Hi Hassan,
    For the OSVVM MemoryPkg, see FileReadH and FileReadB as well as their counter parts FileWriteH and FileWriteB.

    For simulation based RAMS, you want to be using OSVVM’s MemoryPkg as it creates sparse memory data structures – ie it only allocates blocks of memory (in 1 K chunks) if you write to a particular location.

    Best Regards,
    Jim

    #2543
    Hassan
    Member

    Thanks.

    My question is actually about synthesizeable code rather than simulation and thus I have put it under VHDL rather than OSVVM.

Viewing 3 posts - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.