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.

Help me convert VHDL code to Verilog

Status
Not open for further replies.

mondobongo

Newbie level 2
Joined
Apr 7, 2008
Messages
2
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,294
how can i convert this code to verilog...
I didn't understand...

process (Reset,Clk)
variable RegBit :integer range 0 to 13;
begin
RegBit := conv_integer(BitCountPar);
if (nReset = '0')then
Data <= '0';
elsif (Clk'event and Clk = '0')then
if (EnableStrobe = '1')then
Data <= DataReg_ss(13-RegBit);
else
Data <= '0';
end if;
end if;
end process;

Thanks

Added after 1 hours 20 minutes:

please urgent help needed
 

Re: vhdl to verilog

For a quick (but non-elegant) solution, you can use XHDL to convert VHDL codes into verilog.
 

Re: vhdl to verilog

Code:
// here i assume DataReg_ss is memory declared as
// reg [N:0] DataReg_ss[0:13]
// and 0 =< BitCountPar =< 13
always @(negedge clk or negedge reset_n) begin
    if (!reset_n)
      data <= 0;
    else
       if (EnableStrobe)
           data <= DataReg_ss[13 - BitCountPar];
       else
           data <= 0;
end
 

Re: vhdl to verilog

thanks nand_gates
so
I don't have to convert a register to an integer to use in bracket in verilog
but in vhdl i have to
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top