Tuesday, 5 September 2017

FPGA Verilog four bit register with load hold structural design xilinx spartan 3

This video is part of a series to design a Controlled Datapath using a structural approach in Verilog. A Structural approach consist in designing all components needed for the design such as gates to form subsystems and then joining them together to form a larger design like adders and Arithmetic logic units.

The design in these labs was first developed in VHDL you can check the final VHDL version in the link below as well as instructions on how to set up the Waveshare development board to get started, the setup is the same for VHDL and Verilog:

The complete vhdl video tutorial at:

https://youtu.be/_lZcWH0gjIw?list=PLZqHwo1YWqVMSdkQOYC_W0o59LWnZvFn4

Lab Sheets:

http://viahold.com/y37

Lab guide

http://cogismith.com/1OwP






NBIT FOUR BIT REGISTER LOAD HOLD
--------------------------------------------------------------------------------------------
module nbitregister_loadhold
#(parameter N=4)
(
input [N-1:0]D_inputs,
input load_ifzero_hold,
input clk,
input reset,preset,
output [N-1:0]Q_output
);
wire [N-1:0]register_to_mux,to_register,not_connected;

nbit_two_input_multiplexer mux_component(.bin0(Q_output),.bin1(D_inputs),.sel(load_ifzero_hold),.mux_out(to_register));
nbitregister register_component(.clk(clk),.reset(reset),.preset(preset),.D_input(to_register),.Q_output(Q_output),.Q_bar_output(not_connected));

endmodule


FOUR BIT REGISTER COMPONENT
--------------------------------------------------------------------------------------------


CODE: 



D FLIP FLOP COMPONENT
--------------------------------------------------------------------------------------------


CODE:



1BIT TWO INPUT MULTIPLEXER
--------------------------------------------------------------------------------------------



CODE:


4 BIT TWO INPUT MULTIPLEXER
--------------------------------------------------------------------------------------------

CODE:

http://quitoart.blogspot.co.uk/2017/08/fpga-verilog-4-bit-two-input.html

--------------------------------------------------------------------------------------------


TUTORIAL ON HOW TO ADD CLOCK TIMING CONSTRAINTS IN A MODULE


TUTORIAL TO CREATE A SQUARE WAVE GENERATOR TO CLOCK THE CIRCUIT
This is an alternative to clock the circuits another method is shown in the tutorial above


No comments:

Post a Comment