当前位置:网站首页>Embedded virlog code running process

Embedded virlog code running process

2022-06-26 13:36:00 Dressing

be based on vivado Of virlog Operation process (Nexys A7 Development board )


One 、 New project

The chip used is Artix chip ,Nexys A7 Development board .

1. Set the project name and storage path

 Insert picture description here

2. In general use RTL type , If there is no file you want to add , You can check

The box options below  Insert picture description here

3. Here you can use the drop-down box to add chip search options , Select as needed

 Insert picture description here

4.finish

 Insert picture description here

Two 、 Design input and synthesis

The code structure is :
design: Design documents
constraints: Constraint file
Simuation: Simulation file
 Insert picture description here

1. Input design

increase design Code
The code is as follows :

module add(a,b,c,y);
    input a,b,c;
    output y;
    assign y=~(a&b&c);
endmodule

2. To synthesize

 Insert picture description here

3、 ... and 、 Conduct simulation

add to Simulation Code
The code is as follows ( Example ):


module add_sim( );
    parameter N=3;// Is a few variable inputs ,n Just a few 
    reg  clk=0;
    reg [N-1:0] cnt;
    wire a,b,c;
    wire y;// Input / output port 
    
    always #10 clk=~clk;
    
    [email protected](posedge clk)
    begin
        cnt=cnt+1'b1;
    end
    // On the rising edge cnt+1=cnt
    
    initial 
       begin
          cnt=3'b0;//3 Representation bit ,0 Represents the value ,b For binary 
       end
       
    assign {
    a,b,c}=cnt;//cnt to a,b,c Full scale change , Splicing operator 
   
    add utest(a,b,c,y);
endmodule

 Insert picture description here
Simulation :
Behavior simulation
 Insert picture description here
Functional simulation
Time series simulation
 Insert picture description here
Different simulations will have different waveform effects

Four 、 Constraint

First understand the pin resources of the board
 Insert picture description here
1. Configure resources in constraint Wizard mode
 Insert picture description here
2.IO planning Mode configuration pin , Here I use IO Mode configuration
 Insert picture description here
Find the pin name corresponding to the resource in the board resource , stay ports Set in ,IO std If it turns red, choose other black types
here J15,L16,M13 Corresponding dial switch ;H17 Corresponding LED
 Insert picture description here
Save constraint file
 Insert picture description here
 Insert picture description here

5、 ... and 、 Implementation and download

Perform synthesis to generate bitstream
 Insert picture description here
After the previous run ,BitStream It turns green , Click it to generate a bitmap file
 Insert picture description here
Open the board here , After the successful opening, the program The choice of , Click and then click the... That appears program You can run on the board
 Insert picture description here

原网站

版权声明
本文为[Dressing]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/177/202206261240291267.html