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.

use of parameters in verilog

Status
Not open for further replies.

arunssn

Newbie level 2
Joined
Feb 10, 2006
Messages
2
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,305
what are the advantage of using parameters while coding, is there any complexity reduced
 

echo47

Advanced Member level 5
Joined
Apr 7, 2002
Messages
3,942
Helped
638
Reputation
1,274
Reaction score
89
Trophy points
1,328
Location
USA
Activity points
33,176
Verilog parameters are a convenience to make your life easier. They don't affect the synthesized results.
 

jjww110

Full Member level 5
Joined
Apr 19, 2005
Messages
258
Helped
8
Reputation
16
Reaction score
2
Trophy points
1,298
Location
china
Activity points
2,931
easy to transplant to other system
 

vivek

Member level 4
Joined
May 19, 2005
Messages
69
Helped
10
Reputation
20
Reaction score
1
Trophy points
1,288
Activity points
2,040
helps u make your code more reuseable. changes can be made to the code most easily, makes it more readeable. Very useful in FSM coding.
 

stay_in_chaos

Junior Member level 1
Joined
Dec 30, 2005
Messages
17
Helped
1
Reputation
2
Reaction score
0
Trophy points
1,281
Activity points
1,450
parametrs are just like enumerated data types in vhdl that are usr defined.
basically when you have ur own defined parameters then it's quite eassy to work on.

OK
 

maks10

Member level 2
Joined
Jun 9, 2005
Messages
48
Helped
2
Reputation
4
Reaction score
1
Trophy points
1,288
Location
Bangalore, India
Activity points
1,543
complexity is reduced in the sense, when u need to change a value i.e used @ multpile places u need 2 change only once. Like # define in C. If Anyother advantages pls addon....
 

EleApollo

Member level 2
Joined
Jul 24, 2003
Messages
50
Helped
9
Reputation
18
Reaction score
1
Trophy points
1,288
Location
milan
Activity points
324
the advantage of using parameter :
1 reuse. using parameter can easily resue the design
2 maitain.
 

visualart

Advanced Member level 1
Joined
Dec 21, 2001
Messages
467
Helped
28
Reputation
56
Reaction score
4
Trophy points
1,298
Activity points
3,333
Is is readable and interpretative-self using the parameter. Othewise, the parameter may be redefinited when it is quoted, So it is convenient reuse.
 

farmerwang

Member level 3
Joined
May 29, 2002
Messages
59
Helped
4
Reputation
8
Reaction score
2
Trophy points
1,288
Activity points
651
Make your module configurable, easy to maitain, descriptive ...
 

weng

Member level 1
Joined
Jan 13, 2006
Messages
32
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,286
Activity points
1,576
what is the difference between parameter and define?
 

stevepre

Member level 4
Joined
May 10, 2001
Messages
78
Helped
1
Reputation
2
Reaction score
1
Trophy points
1,288
Activity points
595
parameter is valid only within this module.
define ........ after defined, the value stays there and can propagate through all the codes that are compiled later on.

Use parameter is safer.
but sometimes, using `define is pretty convenient, but just be careful.
 

Vonn

Full Member level 4
Joined
Oct 6, 2002
Messages
230
Helped
3
Reputation
6
Reaction score
1
Trophy points
1,298
Activity points
2,460
don't you think using parameter - for FSM - for example will force the synthesis tool to encode your state control to the one you wrote in your parameter definition even if was not the optimum technique for FSM state encoding ?, i mean you just use parameter - usually in FSM - to make your code readable , I agree with that , but look to the other side .. what do you think
 

xuanzhu

Member level 3
Joined
Dec 14, 2002
Messages
64
Helped
5
Reputation
10
Reaction score
1
Trophy points
1,288
Location
shanghai
Activity points
450
increase the reusability and upgradability of your code
 

funster

Full Member level 4
Joined
Jun 30, 2005
Messages
233
Helped
19
Reputation
38
Reaction score
4
Trophy points
1,298
Activity points
2,742
using parameter can improve code's readability.

best regards




arunssn said:
what are the advantage of using parameters while coding, is there any complexity reduced
 

sree205

Advanced Member level 1
Joined
Mar 13, 2006
Messages
454
Helped
58
Reputation
116
Reaction score
24
Trophy points
1,298
Activity points
4,417
Parameters can be used in FSMs compared to `define. Say, if states like idle, read, write are declared using `define and if the design contains multiple FSMs, it might be difficult to debug the design. Here parameters come in handy.
 

tigerajs

Member level 3
Joined
Feb 8, 2006
Messages
55
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,286
Activity points
1,638
of course , you can change it very covinent
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Top