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.

Accumulator (acc)Arithmetic PartsAccumulator (acc)This part accumulates the value of the input data port din withthe value of the register during each clock cycle. The output portdout gets the current value of the register. The register valueaccumulates by addition or subtraction depending on the statusof the scalar input port add_sub.The part can be triggered on the rising edge or the falling edge ofthe scalar input port clk. The polarity of this port is controlled bythe enumerated parameter clk_type (Rising, Falling).The clk can optionally be enabled by the scalar input portclk_en. The polarity of clk_en is controlled by the enumeratedparameter clk_en_type (ActiveHigh, ActiveLow). Do not change the value of the parameterclk_en_type if the clk_en port is not used.The register can be reset to the value of the parameter rst_val by activating the scalar input portrst. The mode is set by the enumerated parameter rst_type (SyncActiveHigh,AsyncActiveHigh, SyncActiveLow, AsyncActiveLow). Do not change the value of theparameter rst_type if the rst port is not used.If the scalar input port load is activated when the rst port not active, the value of the input portdin can be loaded into the register (as opposed to accumulation). The polarity of port load iscontrolled by the enumerated parameter load_type (ActiveHigh, ActiveLow).The scalar input port cin is the carry in port for the arithmetic operation. The polarity of the cinport is controlled by the enumerated parameter cin_type (ActiveHigh, ActiveLow).The scalar output port cout is the carry out of the arithmetic operation. The polarity of port coutis controlled by enumerated parameter cout_type (ActiveHigh, ActiveLow). The carry out isavailable one cycle before the value gets registered. If the timing for carry-out needs to besynchronized with the register output, a separate flip-flop needs to be used to account for thedelay. This part was designed not to have an in-built flip-flop for the output port cout so as tosave a flip-flop unless it is required.If the arithmetic operation is deactivation (scalar input ports rst or load are active or clk isdisabled) the value of the scalar output port cout must be ignored because it reflects a carry-outof an operation not selected by the multiplexer.The arithmetic operation can be done in unsigned or signed mode. This operation is controlledby the enumerated parameter sign_type (Unsigned, Signed).The arithmetic operation is controlled dynamically by the scalar input port add_sub. Thepolarity of port add_sub is controlled by the enumerated parameter add_sub_type (ActiveHigh,ActiveLow).If only the adder or the subtractor is required, the scalar input port add_sub can be driven by aconstant.If add_sub is driven by a 1 with positive polarity (add_sub_type = ActiveHigh) an adder isimplemented or a subtractor with negative polarity, add_sub_type = ActiveLow). If only an<strong>ModuleWare</strong> <strong>Reference</strong> Manual, Library Version 1.9 103September 18, 2008

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

Saved successfully!

Ooh no, something went wrong!