13.07.2015 Views

ModuleWare Reference Guide - Hornad

ModuleWare Reference Guide - Hornad

ModuleWare Reference Guide - Hornad

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Sequential PartsModulo Counter (modcntr)maximum of 2n states and the corresponding LFSR counters will have 2n -1 states (Johnsoncounters have 2n states). Because the reset state has to be unique, the maximum allowable countwith n registers is 2n-1 for binary and 2n-2 for LFSR (2n-1 for Johnson). As a result when thecount is equal to 2n-1, the LFSR counter will have one register more than the correspondingbinary (incrementing/decrementing) counter. For all other cases however, the number ofregisters required will be the same.If clk_en is not connected, it is driven by 1. If the clock enable feature is not used, the scalarinput port clk_en must be unconnected and the parameter clk_en_type must be set toActiveLow. Port clk_en can also be driven by an active driver, in which case the clk_en_typemust be correctly adjusted. You are advised to not edit the value of clk_en_type if the portclk_en is not to be used. The HDL code for clk_en is optimized away if it is not used.Parameter sync_rst_priority has no effect when the rst_type is AsyncActiveHigh orAsyncActiveLow. When rst_type is SyncActiveHigh or SyncActiveLow and sync_rst_priorityis enabled, a synchronous reset will always reset synchronously regardless of the clock enable.When sync_rst_priority is disabled, the clock enable takes priority over the reset.Functioncregnewmsbreloadvalresetvalthe internal registerthe new value of the MSB that is calculated from the current registerstate by using a special polynomial.value assigned to registers when all registers contain zero (for modulomode only)value assigned to registers on resetFor LFSR styleIf reset is synchronous, then at every enabled clk trigger (rising edge if clk_type = Rising,falling edge if clk_type = Falling):creg = resetval= reloadval= {NOT(LSB), creg} >> 1= {newmsb, creg} >> 1dout = (creg = 0)= NOT(creg = 0)if rst is activeif creg = 0 and mode = modulootherwise when count < 6otherwise when count ≥ 6if dout_type = ActiveHighif dout_type = ActiveLowIf reset is asynchronous:creg = resetval if rst is active190<strong>ModuleWare</strong> <strong>Reference</strong> Manual, Library Version 1.9September 18, 2008

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!