Create new programe -> Next -> set project name and address
select Project types: RTL Project: the most common project type, design Verilog or VHDL programe. have IP integrator, generate IP, RTL analysis, synthesis, implementation, design planning
Create new source, can be ignored
default
Define module, click “bus” if have multi-bits data stream
add files
File -> add sources -> add or create design source -> “+” -> add file -> enter file name and press OK -> finish
set port names. click “Bus” is this port has multi-bits -> OK
module test( input rst, input clk, output [3:0] cmd ); reg [3:0] value=0; assign cmd=value; always@ (posedge clk or negedge rst) begin if (!rst) begin value<=0; end value<=value+1; end endmodule
add testbench and simulation
File -> add sources -> add or create simularion source -> “+” -> add file -> enter file name and press OK -> finish
set reg and wire
set initial
import source and set all variables
the imported source file will be folded under testbench.