This is a behavioral model of a multiplier for unsigned binary numbers. It multiplies a. 4-bit multiplicand by a 4-bit multiplier to give an 8-bit product.
![]() ![]()
I've a design problem in VHDL with a serial adder.The block diagram is taken from a book.Since i'm not skilled enough in design with clock (except some silly flip flop i've found on the web, and similarly a register, where the design is pretty much the same) i have some problem in the design.I would start with a register (n bit) a full adder and than a flip flop as basic component. Register and flip flop should be updated and shift for every clock cycle, the full adder is combinatorial so it is ok. I'm not sure however how the whole entity for the adder should be designed i would attempt with something like entity adderSerial isgeneric(n: natural);port(x, y: in stdlogicvector(n - 1 downto 0);clk: in stdlogic;z: out stdlogicvector(n - 1 downto 0));end entity adderSerial;The internal architecture confuse me a lot since actually i don't know how to behave in the synchronization stuff. At high level i would say probably internally should be even a counter that probably keep track of when all the bits are being processed. But i'm not sure if this is the right way to perform this design, i would like to keep as much close i can to the diagram i posted.Any suggestion for such simple design?Update.Ok here i have my first attempt for the design.
![]()
I splitted in three process, first process for handling the input registers, second for handling the full adder and third for handling the register z, i sync with a clock signal and i think i've written a correct sensitivity list for each process. Input signal are also clk, load and clear. Clk is the clock, load is to write the x,y value in the registers while clear is to clear registers and flip flop. Pleaaaaaaaaaase give me any feedback!!! Z: out stdlogicvector(n - 1 downto 0));The output must be stdlogic, because it is a serial outputAlso, you can use the + operator directly to the stdlogicvectors.
Just add the 'ieee.stdlogicsigned' librarySo that you can write zreg '0');elsif load = '1' thenzreg.
![]() Comments are closed.
|
AuthorWrite something about yourself. No need to be fancy, just an overview. Archives
March 2023
Categories |