hneemann / Digital

A digital logic designer and circuit simulator.
GNU General Public License v3.0
4.45k stars 449 forks source link

How to run the MIPS example on Basys3? #430

Closed suluoniu closed 4 years ago

suluoniu commented 4 years ago

can the MIPS CPU example be downloaded to the basys3 ?

hneemann commented 4 years ago

To run the processor example on a Basys3 board three steps are required:

  1. At first select the BASYS3 config in the tool-chain settings. The file is called BASYS3.config This allows the simulator to add the FPGA specific hdl code required to create the clock signal.
  2. Export a HDL file (either VHDL or Verilog) using the new BASYS3 menu items. This also creates a Vivado project which can be opened directly by Vivado.
  3. Use Vivado to create the bit stream and to flash the bit stream to the board.
suluoniu commented 4 years ago

I do as you told me, only the example ProcessorMux.dig can export vhdl successfully ,is it right?

hneemann commented 4 years ago

Yes, there are two examples available: HDLExample.dig and VGAExample.dig. In HDLExample.dig the processor runs a program that creates a lightchase that can be controlled with the buttons. And VGAExample.dig also contains a VGA card and the running program displays a character set on a connected VGA monitor and you can move a smiley across the screen with the buttons.

Both examples use ProcessorMux.dig because it uses a muxer instead of a High-Z bus. Bus drivers with High-Z output are not supported in HDL export. See also here.