Forum Discussion

Altera_Forum's avatar
Altera_Forum
Icon for Honored Contributor rankHonored Contributor
14 years ago

16-bit processor design

Ok, pretty basic question here, i know that Altera has all kinds of tutorials so I'm just asking for a redirect to the correct ones.

I have a project in Quartus II where I have designed a very very basic 16-bit processor. How do I go about testing my processor? I'm not really sure what SOPC builder or Qsys do. Basically I just want to go from the design stage to the ability to input basic assmebly instructions. If anyone can point me in the right direction that would be much appreciated.

3 Replies

  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    --- Quote Start ---

    Ok, pretty basic question here, i know that Altera has all kinds of tutorials so I'm just asking for a redirect to the correct ones.

    I have a project in Quartus II where I have designed a very very basic 16-bit processor. How do I go about testing my processor? I'm not really sure what SOPC builder or Qsys do. Basically I just want to go from the design stage to the ability to input basic assmebly instructions. If anyone can point me in the right direction that would be much appreciated.

    --- Quote End ---

    You should start by using Modelsim. That'll allow you to use non-synthesizeable constructs, like reading instructions from a file.

    Did you create your processor using VHDL or Verilog?

    Cheers,

    Dave
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    --- Quote Start ---

    You should start by using Modelsim. That'll allow you to use non-synthesizeable constructs, like reading instructions from a file.

    Did you create your processor using VHDL or Verilog?

    Cheers,

    Dave

    --- Quote End ---

    I have been using ModelSim to input instructions, but they are all hardcoded in and I would ultimately like to be able to load a basic assembly program onto the board and have it execute. Any advice on how to go from testing with input/output pins to being able to use custom assembly instructions?
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    --- Quote Start ---

    I have been using ModelSim to input instructions, but they are all hardcoded in and I would ultimately like to be able to load a basic assembly program onto the board and have it execute. Any advice on how to go from testing with input/output pins to being able to use custom assembly instructions?

    --- Quote End ---

    So what is your processor interface? Does it have a separate instruction and data buses? Have you created those buses with signals that adhere to the Avalon specification? If you have, then you could create a _hw.tcl file, and create a Qsys system containing the processor, some SRAM at your processor boot address, a PIO, and another master such as the Avalon-MM BFM.

    The PIO component could be used to hold your processor in reset. The Avalon-MM BFM master can then be used to fill the SRAM with the assembly instruction for your processor. The BFM can then program the PIO to release your processor from reset, and it'll boot from SRAM.

    The BFM can then reset your processor, load the next image to SRAM, and you can repeat the process.

    Cheers,

    Dave