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.

VHDL(procedure)----verilog(task)

Status
Not open for further replies.

xihushui

Member level 2
Joined
May 12, 2006
Messages
50
Helped
3
Reputation
6
Reaction score
3
Trophy points
1,288
Activity points
1,599
vhdl procedure

this is a procedure in VHDL,but now i want to change it to a task in verilog.how to do it ? stopBitLength is real,is not a in or out(in fact,it is in),how to do in task of verilog?
procedure sout_chk (
numDataBits : integer range 5 to 8;
Txdata : in std_logic_vector(7 downto 0);
ParityBit : in std_logic;
stopBitLength : real;
parityBitExist : boolean;
constant cycleTime : in time;
signal SOUT : in std_logic) is
variable i : integer;
begin
.......
endtask
 

task vhdl

Hi,

I guess you are wondering how to pass stopBitLength into verilog tasks? You can do this is two ways

1. If this is the case you can use the "parameter" option in verilog. You can define stopBitLength as parameter and directly use stopBitLength inside the tasks without even declaring them in the task declaration list.

2. You can also use intergers & real data type objects as inputs to the task so in your case you can defineas

task sout_chk;
input integer numDataBits;
input [7:0] Txdata;
input ParityBit;
input real stopBitLength
input boolean parityBitExist;
input SOUT;

begin
...........
end
endtask
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top