milindashokshende
Newbie level 5
- Joined
- Jan 9, 2008
- Messages
- 9
- Helped
- 0
- Reputation
- 0
- Reaction score
- 0
- Trophy points
- 1,281
- Activity points
- 1,360
I am researching the co-simulation interface VHDL and systemC. systemC is based on C++. as a very simple model, I want to creat a C function which wrapps a VHDL DFF code. which I may use in C++ class as a function member. i want to creat stucture like this C++ Class{ (private:fucntion member(C fuction which wrapps (VHDL Code)))}; above code line does not strictly follow the syntactical formats. I would like to write a DFF testbench in C++.
I want to know, how can I write a C++ wrapper for a simple VHDL D-flip-flop code. The code can be as follows:
entity DFF is
Port ( D : in std_logic;
CLK : in std_logic := '0';
Q : out std_logic;
QN : out std_logic);
end DFF;
architecture behv of DFF is
begin
process (CLK)
begin
if CLK'event and CLK = '1' then
Q <= D;
QN <= NOT D;
end if;
end process;
end behv;
I want to know, how can I write a C++ wrapper for a simple VHDL D-flip-flop code. The code can be as follows:
entity DFF is
Port ( D : in std_logic;
CLK : in std_logic := '0';
Q : out std_logic;
QN : out std_logic);
end DFF;
architecture behv of DFF is
begin
process (CLK)
begin
if CLK'event and CLK = '1' then
Q <= D;
QN <= NOT D;
end if;
end process;
end behv;
Last edited: