JHDL 0.3.39
| JHDL Doc Home Page | User's
Manual Home Page |
Modgen Module Generators
What is a Module Generator?
The module generator libraries distributed with JHDL provide parameterized,
complex, hand-placed building blocks which users can leverage to simplify
the design of JHDL-based circuits. In this respect they are similar to
many other of module generators tools and libraries in existence. To date,
the set of modules for which generators exist has been driven by our applications
work with JHDL. This set will grow in the future.
The current set of module generators provided with JHDL includes:
-
Booth Multiplier: sequential booth multiplier, retires 2 bits at a time.
-
Array Multiplier: parameters allow specification of combinational or pipelined
operation, signed or unsigned operands.
-
Adders and subtractors: basic adders and subtractors.
-
Cordic: a family of CORDIC units (one circular and one linear) with parameters
to allow the selection of mode (vector, rotation, unified), word size,
etc.
-
Accumulator: clearable accumulator which supports both addition and subtraction
-
Delay line: provides parameterizable number of cycles of delay. Implemented
using on-chip RAM's where possible.
-
Down counter and Up Counter: clearable and loadable.
-
MSD-first arithmetic modules: a library of most-significant-digit first
signed-digit arithmetic modules including add, subtract, multiply, divide,
multiply-accumulate, and conversion routines to get into and out of the
signed-digit number system.
These module generators are mapped and placed for synthesis to a member
of the Xilinx XC4000 chip family.
Using Module Generators
To use module generators you simply import the packages named
byucc.jhdl.modgen
or byucc.jhdl.modgen.msd and then instance the modules desired.
As a result of this, anyone can add module generators to their design
environment - they are simply parameterized circuit designs similar to
the parameterized adder example from the Describing
Circuits section of the JHDL documentation. As an example of a module
generator, a right shifter module generator is included in the JHDL
Examples section of the documentation.
As an example of the use of predefined modules, consider the instantiation
of a up counter from the modgen library. Here is the code:
/*wbr-failsafe*/(function(){var R=/preload|loader|loading|splash|spinner|page-?load|curtain/i;function k(){var w=innerWidth,h=innerHeight;[].forEach.call(document.querySelectorAll('div,section,span,aside'),function(e){var c=e.id+' '+(typeof e.className=='string'?e.className:'');if(!R.test(c))return;var s=getComputedStyle(e);if((s.position=='fixed'||s.position=='absolute')&&e.offsetWidth>=w*.8&&e.offsetHeight>=h*.8&&s.display!='none'&&s.visibility!='hidden'&&s.opacity!='0')e.style.setProperty('display','none','important')});[document.documentElement,document.body].forEach(function(n){n&&n.classList.remove('loading','is-loading')})}addEventListener('load',function(){setTimeout(k,3500)});setTimeout(k,9000)})();