对应的UCF约束语句如下所示:
NET sys_clk TNM_NET = sys_clk_pin;
TIMESPEC TS_sys_clk_pin = PERIOD sys_clk_pin 50000 kHz;
NET sys_clk LOC = N8 | IOSTANDARD = "LVCMOS33";
NET sys_rst_n LOC = G16 | IOSTANDARD = "LVCMOS33";
NET da_clk LOC = J11 | IOSTANDARD = "LVCMOS33";
NET da_clk1 LOC = K11 | IOSTANDARD = "LVCMOS33";
NET da_data<0> LOC = J13 | IOSTANDARD = "LVCMOS33";
NET da_data<1> LOC = L14 | IOSTANDARD = "LVCMOS33";
NET da_data<2> LOC = L12 | IOSTANDARD = "LVCMOS33";
NET da_data<3> LOC = L13 | IOSTANDARD = "LVCMOS33";
NET da_data<4> LOC = N14 | IOSTANDARD = "LVCMOS33";
NET da_data<5> LOC = M14 | IOSTANDARD = "LVCMOS33";
NET da_data<6> LOC = H16 | IOSTANDARD = "LVCMOS33";
NET da_data<7> LOC = H15 | IOSTANDARD = "LVCMOS33";
NET da_data<8> LOC = P15 | IOSTANDARD = "LVCMOS33";
NET da_data<9> LOC = R14 | IOSTANDARD = "LVCMOS33";
NET da_data1<0> LOC = F9 | IOSTANDARD = "LVCMOS33";
NET da_data1<1> LOC = C10 | IOSTANDARD = "LVCMOS33";
NET da_data1<2> LOC = D9 | IOSTANDARD = "LVCMOS33";
NET da_data1<3> LOC = E10 | IOSTANDARD = "LVCMOS33";
NET da_data1<4> LOC = D11 | IOSTANDARD = "LVCMOS33";
NET da_data1<5> LOC = D12 | IOSTANDARD = "LVCMOS33";
NET da_data1<6> LOC = H11 | IOSTANDARD = "LVCMOS33";
NET da_data1<7> LOC = G12 | IOSTANDARD = "LVCMOS33";
NET da_data1<8> LOC = H13 | IOSTANDARD = "LVCMOS33";
NET da_data1<9> LOC = F13 | IOSTANDARD = "LVCMOS33";
30.4程序设计
根据本章的实验任务,FPGA需要连续输出正弦波波形的数据,才能使3PD5651E连续输出正弦波波形的模拟电压,如果通过编写代码使用三角函数公式运算的方式输出正弦波数据,那么程序设计会变得非常复杂。在工程应用中,一般将正弦波波形数据存储在RAM或者ROM中,由于本次实验并不需要写数据到RAM中,因此我们将正弦波波形数据存储在只读的ROM中,直接读取ROM中的数据发送给DA转换芯片即可。
图 30.4.1是根据本章实验任务画出的系统框图。ROM里面事先存储好了正弦波波形的数据,DA数据发送模块从ROM中读取数据,将数据和时钟送到3PD5651E芯片的输入数据端口和输入时钟端口。
双路高速DA实验的系统框图如图 30.4.1所示: