Black gold AX301 development board learning (1)-water lamp experiment and black gold AX301 development board information

This is the first time I try to use the AX301 development board for learning. This article mainly talks about the use of the AX301 development board through a small experiment with a water lamp.
1. The Black Gold AX301 is a basic student experiment board, which is a good choice for learning FPGA. This development board is ALTERA's CYCLINE IV series FPGA, the model is EP4CE6F17C8, a 256-pin FPGA package. According to ALTERA official data, CYCLONE iv reduces power consumption by 25% compared to CYCLINE III.
Insert picture description here
The resources of this FPGA are shown in the figure below: the
Insert picture description here
main parameters, the
logic unit LE: 6272;
multiplier: 392;
RAM: 276480bit;
IO number: 179;
core voltage: 1.15V-1.25V (1.2V recommended);
operating temperature :

Schematic diagram of the structure of the entire system at 0-85℃ :
Insert picture description here
Through this diagram, we can see the functions that our development platform can achieve.
USB interface power supply mode, only need a USB cable to complete the power supply to the development board. At the same time, the USB interface also realizes the function of USB to serial port. Connect the USB cable to realize serial communication with the computer.
One camera interface, which can be connected to the OV7670 camera;
one 7-inch TFT LCD screen interface, which can be connected to the model ATO7OTN83, 7-inch TFT LCD screen;-PS
/2 interface, which can be connected to a PS/2 interface mouse or keyboard;
one VGA interface , VGA interface is 16bit, can display 65536 colors, and can display information such as color pictures.
A piece of RTC real-time clock, equipped with a battery holder, the battery model is CR1220.
A piece of EEPROM24LCO4 with IIC interface;
a buzzer, which can realize SOS alarm and other functions;
6-bit common anode digital tube, through dynamic scanning, realize the dynamic display of numbers;
a piece of 256Mbit SDRAM, which can be used as a data buffer or as a NIOS Running memory;
4 light-emitting diodes LED;
4 independent buttons;
onboard 5OM active crystal oscillator, providing a stable clock source for the development board;
1 40-pin expansion port (2.54mm pitch), 34 of which are IO ports , 1 way 5V power supply, 2 way 3.3V power supply, 3 way GND. Expansion modules such as 3.2 inch TFT module and AD/DA module can be connected.
The JTAG port is reserved, which can debug and program the FPGA.
1 SD card socket, support SPI mode.
2. Use the Quartus II software compilation environment to write the running water lamp experiment. The previous simulation was to use Modelsim SE for functional simulation and timing simulation.
1. Flow lamp program

module led_test_top(
    input               sys_clk  ,  //系统时钟
    input               sys_rst_n,  //系统复位,低电平有效
  
    output  reg  [3:0]  led         //4个LED灯
    );
//reg define
reg [23:0] counter;
//*****************************************************
//**                    main code
//*****************************************************                                                                                                                                                                                                                        
//计数器对系统时钟计数,计时200纳秒
always @(posedge sys_clk or negedge sys_rst_n) begin
    if (!sys_rst_n)
  counter <= 24'd0;
    else if (counter < 24'd24_999_999)
        counter <= counter + 1'b1;
    else
        counter <= 24'd0;
end
//通过移位寄存器控制IO口的高低电平,从而改变LED的显示状态
always @(posedge sys_clk or negedge sys_rst_n) begin
    if (!sys_rst_n)
        led <= 4'b0001;
    else if(counter == 24'd10) 
        led[3:0] <= {
    
    led[2:0],led[3]};
    else
        led <= led;
end
endmodule 

RTL circuit diagram
Insert picture description here
Simulation circuit diagram

Insert picture description here
2. Development board download process
First compile, as shown in the figure below, Insert picture description here
perform pin assignment and
Insert picture description here
Insert picture description here
prepare to download.
Insert picture description here
After opening, check whether the download line is found. Insert picture description here
If there is no USB-Blaster, check whether the download driver is successfully installed in the device manager
Insert picture description here

If as shown in the picture above, you need to right-click to update the driver. The
first step: Right-click on the picture you just saw, and select "Update Driver Software"

Step 2: In the pop-up box, select "Browse your computer for driver software®", if you select automatic search, the installation will not succeed, you must search manually

Choose this as the path: D:\altera\13.0\quartus\drivers\usb-blaster Mine is under the D drive, as long as the path is correct, just wait for the end of the installation, and you will have the result you want. .

Insert picture description here

Then add the download file and
Insert picture description here
Insert picture description here
Insert picture description here
finally start the download and it’s done
Insert picture description here

Insert picture description here
Insert picture description here

After downloading the sof file, the content of the current program will be displayed, but the data will be lost after the power is turned off. We need to convert the sof file into a jic file, add a flash, and download again, so that the data will not be lost due to power failure.
The method is shown below
Insert picture description here

Insert picture description here
Insert picture description here
Insert picture description here
Insert picture description here
Insert picture description here
Insert picture description here
Insert picture description here
Created successfully! ! !
Then reopen the download tool and add the JIC file
Insert picture description here

Insert picture description here

Data download link: https://pan.baidu.com/s/1P0IqSFkvVqQr2L8Gg5NNvQ
extraction code: m9pu

Disclaimer: This article is only suitable for learning, and its content contains excerpts and summaries from the book. Welcome everyone to add and make progress together.

Guess you like

Origin blog.csdn.net/qq_24213087/article/details/108238682