Forum Discussion

Altera_Forum's avatar
Altera_Forum
Icon for Honored Contributor rankHonored Contributor
16 years ago

Help: verilog HDL to VHDL

Hi all,

I got this ps/2_keyboard code from the examples of DE1. However the code is in verilog HDL which I really have no idea with it. I need this quite urgent for my work so is that possible anyone can translate the code into VHDL?

5 Replies

  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    You may have more helpful answers if you try it in the first place and then ask for help to detect and correct any remaining errors.

  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    I'd have a look at wikipedia if I were you. You should be able to pick up enough to translate this sort of code.

  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    Why not leave it as a Verilog Module and just instantiate it from your VHDL code. You can get Quartus to create the instantiate file for you and pass parameters to it if you need to alter the default settings. If the module code is OK you can just forget about it and work on your own stuff.

  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    That depends on whether:

    your simulator is licensed to simulate two languages

    you're happy supporting a design in two languages, one of which you're not familiar

    you're happy that the design is actually doing what you think it is - if you can't simulate this then you might feel so certain.

    You always have to weigh up the risks with these things - do the advantages of translating the code outweigh the risk of introducing a bug? There is no general answer to this question - each designer has to assess it for their design.
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    Another option is that you might be able to place and route just this file in Quartus, with the option of producing a gate level VHDL netlist. This will give you effectively a behavioural VHDL model which you can use for simulation; the verilog rtl model you still use for synthesis.