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.

Mixed VHDL and Verilog design

Status
Not open for further replies.

shaiko

Advanced Member level 5
Joined
Aug 20, 2011
Messages
2,644
Helped
303
Reputation
608
Reaction score
297
Trophy points
1,363
Activity points
18,302
I'm stepping into a project that involves mixed language design (VHDL and Verilog).
Most of the files are *.V while some are *.VHD
How do I compile them to a single project ?
 

This is called "instantiation by position" right ?
 

yes... but the concept applies for both instantiation by position and by name..
 
  • Like
Reactions: shaiko

    shaiko

    Points: 2
    Helpful Answer Positive Rating
the concept applies for both instantiation by position and by name

Suppose I have a verilog file named : "some_verilog_file.v" and in this file there's a module named: "some_verilog_module".

If I want to instantiate this module in a different VHD file - all I need to do is declare "some_module" as a component and instantiate it - as if "some_module" was a true VHDL written entity ?
 

yes... thats what is done is that example..
 
  • Like
Reactions: shaiko

    shaiko

    Points: 2
    Helpful Answer Positive Rating
Yes it is done this way.

Make component for your verilog code and simly instantiate it like

https://www.xilinx.com/itp/xilinx10/isehelp/ism_p_instantiating_verilog_module_mixedlang.htm

Code:
--VHDL code
library IEEE;
use IEEE.STD_LOGIC_1164.ALL;

entity vhdl_top is
    Port ( A : in  STD_LOGIC;
           B : in  STD_LOGIC;
           C : out  STD_LOGIC);
end vhdl_top;

architecture Behavioral of vhdl_top is

component ver_cnt is 
port(
a: in std_logic;
b: in std_logic;
c: out std_logic
);
end component;

begin

--instantiation
uut : ver_cnt port map(a => A, b => B, c => C);

end Behavioral;

Code:
//Verilog Code
module ver_cnt(
    input a,
    input b,
    output c
    );

assign c= a ^ b;

endmodule
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top