fpga与三八译码器(BASYS3 VIVADO18)

参考这篇文章

  • 之前写过如何创建项目,看这里,现在稍作补充
  • SYNTHESIS下打开Schematic
    fpga与三八译码器(BASYS3 VIVADO18)_第1张图片
  • 就和?了
    fpga与三八译码器(BASYS3 VIVADO18)_第2张图片
  • decoder.v
module decoder(
    input [2:0] sw,
    output reg[7:0] led
    );
    always@(sw)begin
        case(sw)
            3'b000: led = 8'b0000_0001;
            3'b001: led = 8'b0000_0010;
            3'b010: led = 8'b0000_0100;
            3'b011: led = 8'b0000_1000;
            3'b100: led = 8'b0001_0000;
            3'b101: led = 8'b0010_0000;
            3'b110: led = 8'b0100_0000;
            3'b111: led = 8'b1000_0000;
        endcase
    end
endmodule
  • decoder.xdc
#switches
set_property PACKAGE_PIN V17 [get_ports {sw[0]}]
    set_property IOSTANDARD LVCOMS33 [get_ports {sw[0]}]
set_property PACKAGE_PIN V16 [get_ports {sw[1]}]
    set_property IOSTANDARD LVCOMS33 [get_ports {sw[1]}]
set_property PACKAGE_PIN W16 [get_ports {sw[2]}]
    set_property IOSTANDARD LVCOMS33 [get_ports {sw[2]}]

#LEDS
set_property PACKAGE_PIN U16 [get_ports {led[0]}]
    set_property IOSTANDARD LVCOMS33 [get_ports {led[0]}]
set_property PACKAGE_PIN E19 [get_ports {led[1]}]
    set_property IOSTANDARD LVCOMS33 [get_ports {led[1]}]
set_property PACKAGE_PIN U19 [get_ports {led[2]}]
    set_property IOSTANDARD LVCOMS33 [get_ports {led[2]}]
set_property PACKAGE_PIN V19 [get_ports {led[3]}]
    set_property IOSTANDARD LVCOMS33 [get_ports {led[3]}]
set_property PACKAGE_PIN W18 [get_ports {led[4]}]
    set_property IOSTANDARD LVCOMS33 [get_ports {led[4]}]
set_property PACKAGE_PIN U15 [get_ports {led[5]}]
    set_property IOSTANDARD LVCOMS33 [get_ports {led[5]}]
set_property PACKAGE_PIN U14 [get_ports {led[6]}]
    set_property IOSTANDARD LVCOMS33 [get_ports {led[6]}]
set_property PACKAGE_PIN V14 [get_ports {led[7]}]
    set_property IOSTANDARD LVCOMS33 [get_ports {led[7]}]
  • 不知道为什么报错
    fpga与三八译码器(BASYS3 VIVADO18)_第3张图片
  • 学长说IO配得不太对
    fpga与三八译码器(BASYS3 VIVADO18)_第4张图片
  • RTL修改
    fpga与三八译码器(BASYS3 VIVADO18)_第5张图片
  • 左边也可以连接器件,要是没有弹出消息的话
    fpga与三八译码器(BASYS3 VIVADO18)_第6张图片
  • 写入flash
    fpga与三八译码器(BASYS3 VIVADO18)_第7张图片
    fpga与三八译码器(BASYS3 VIVADO18)_第8张图片
  • 烧写出现错误
    fpga与三八译码器(BASYS3 VIVADO18)_第9张图片
    fpga与三八译码器(BASYS3 VIVADO18)_第10张图片
  • 换一台电脑烧写

你可能感兴趣的:(fpga我来了)