![]() Module parameters can be used to override parameter definitions within a module and this makes the module have a different set of parameters at compile time. But, they are normally made as wide as the value to be stored requires them to be and hence a range specification is not necessary. There are two major types of parameters, module and specify and both accepts a range specification. It is illegal to redeclare a name that is already used by a net, variable or another parameter. Parameters are basically constants and hence it's illegal to modify their value at runtime. Parameter f_const = 2'b3 // 2 bit value is converted to 8 bits 8'b3 MAX_WIDTH = 32 // Declares two parameters ![]() ![]() Parameter REAL = 4.5 // REAL holds a real number Parameter MSB = 7 // MSB is a parameter with a constant value 7 They are like arguments to a function that are passed in during a function call. So, an N-bit adder can become a 4-bit, 8-bit or 16-bit adder. For example, a 4-bit adder can be parameterized to accept a value for the number of bits and new parameter values can be passed in during module instantiation. Parameters are Verilog constructs that allow a module to be reused with a different specification. Introduction What is Verilog? Introduction to Verilog Chip Design Flow Chip Abstraction Layers Data Types Verilog Syntax Verilog Data types Verilog Scalar/Vector Verilog Arrays Building Blocks Verilog Module Verilog Port Verilog Module Instantiations Verilog assign statements Verilog assign examples Verilog Operators Verilog Concatenation Verilog always block Combo Logic with always Sequential Logic with always Verilog initial block Verilog in a nutshell Verilog generate Behavioral modeling Verilog Block Statements Verilog Assignment Types Verilog Blocking/Non-blocking Verilog Control Flow Verilog if-else-if Verilog Conditional Statements Verilog for Loop Verilog case Statement Verilog Functions Verilog Tasks Verilog Parameters Verilog `ifdef `elsif Verilog Delay Control Verilog Inter/Intra Delay Verilog Hierarchical Reference Verilog Coding Style Effect Gate/Switch modeling Gate Level Modeling Gate Level Examples Gate Delays Switch Level Modeling User-Defined Primitives Simulation Verilog Simulation Basics Verilog Testbench Verilog Timescale Verilog Scheduling Regions Verilog Clock Generator System Tasks and Functions Verilog Display tasks Verilog Math Functions Verilog Timeformat Verilog Timescale Scope Verilog File Operations Code Examples Hello World! Flops and Latches JK Flip-Flop D Flip-Flop T Flip-Flop D Latch Counters 4-bit counter Ripple Counter Straight Ring Counter Johnson Counter Mod-N Counter Gray Counter Misc n-bit Shift Register Binary to Gray Converter Priority Encoder 4x1 multiplexer Full adder Single Port RAM Verilog Pattern Detector Verilog Sequence Detector
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |