Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

using vhdl & verilog in same project

Status
Not open for further replies.

grules

Newbie level 5
Joined
Feb 22, 2011
Messages
9
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,334
iam trying to use to code files: VHDL and Verilog in same project using quartus. I get error that variables that i have in verilog not defined in vhdl.
How can i use both files in same project?
thanx!
 

  • Like
Reactions: grules

    grules

    Points: 2
    Helpful Answer Positive Rating
Hi
i still have some problems..
I created a new project in Quartus , added two files to project, one is VHDL second is Verilog file, compilation is OK, but what i need is to use one of the variable (its bit string that i got from UART port) from Verilog code and USE it in VHDL code to controll my fpga in way that i need ( turn on LEDs for example).

So far after compilation i doing Pin Planner and i see only I/O from VHDL code ,Where is Verilog I/O in Pin planner??
If I'll run Verilog file in separate project it will run good and Pin Planner is recognize all I/O ports.

So still I didnt find a way to combine to codes in same project and use both codes I/O ports in Pin Planner.

thanx!
 

I am not sure what you are intent to do.
First of all, Verilog/VHDL mixed projects depend heavily on the support of the tools you use. Check the manual of your tools (Quatus) can find out the name convertion between these two languages.
The second thing you need to understand, only part of the name spaces are recognizable between languages.
For example, VHDL, under the support of your tools, can recognize the module name, port and port width of a verilog module but have no idea what is inside.
Verilog, on the other hand, can recognize the entity name, ports (defined by std_logic or std_logic_vector in most cases), but have no idea what is inside and which architecture should be used when initialize an entity (this is defined by the tool).

If the variable mentioned in your question is really a variable in a verilog code, I am afraid to say there is no way for a VHDL entity to visit it, only if your tool manual say otherwise. In fact, it is already quite unlikely for a VHDL to visit any internal signal (no matter reg or wire) in a verilog module unless it is connected with a port.

May be a solution for you, output any internal signals you need to a port and therefore the VHDL entity can visit it.
After all, direct access a variable in a verilog module using hierarchical names is not recommended in RTL coding. This is only a useful trick in test benches.
 
  • Like
Reactions: grules

    grules

    Points: 2
    Helpful Answer Positive Rating
FINALLY !!! ITS WORKS! :razz:
So my mistake was that i didn't declare the COMPONENT (that in my case is verilog file) right.
so the right way is : first i write COMPONENT and his ports ( in architecture) then i need to do PORT MAPPING (ports from verilog file).
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top