Attaching verilog components to FPGA Propeller 1 design
escher
Posts: 138
in Propeller 1
Hello all.
I've managed to load the Propeller 1 open-source FPGA design onto my DE0-Nano board.
I would like to be able to test my peripherals on the design BEFORE I order the physical parts.
For example, I need to be able to accept 16 different physical user inputs, and therefore I'm designing to feed them into daisy-chained parallel-to-serial shift registers. The Propeller will have PASM code running on a cog to accept the bits serially and parse them for the individual outputs.
The problem however is that I don't have enough experience with Quartus or Verilog to determine how to attach these peripheral signals to the Propeller design. The design has all the pins mapped to physical equivalents on the DE0 board by default.
Anyone with experience in this able to help me? Thank you!
I've managed to load the Propeller 1 open-source FPGA design onto my DE0-Nano board.
I would like to be able to test my peripherals on the design BEFORE I order the physical parts.
For example, I need to be able to accept 16 different physical user inputs, and therefore I'm designing to feed them into daisy-chained parallel-to-serial shift registers. The Propeller will have PASM code running on a cog to accept the bits serially and parse them for the individual outputs.
The problem however is that I don't have enough experience with Quartus or Verilog to determine how to attach these peripheral signals to the Propeller design. The design has all the pins mapped to physical equivalents on the DE0 board by default.
Anyone with experience in this able to help me? Thank you!
Comments
You can also use "Assignments" -> "Assignment Editor" although I have never used that.
In your new top you will instantiate the Propeller and whatever new peripheral hardware modules you have. Your new top module would have all the same input output signals of the current Propeller top module. In you new top you would instantiate the Propeller and any new peripherals you have and "wire" them them up. Also wire them to the input/output signals.
You might get some inspiration on how to do this from looking at the top level module of my RISC V processor effort in Verilog for the DE0 Nano: https://github.com/ZiCog/xoro/blob/master/rtl/xoro_top.v
In there you can see how my top level module has input and outputs defined, how it instantiates the picrorv32 processor core and peripherals like memory and UART and how it wires them together.
Mind you, I'm only a Verilog beginner so this may not be the best way to proceed.
When they look like they are logically correct it's time to drop them into Quartus.
I had a brief look at the prop Verilog but gave up when I saw it had a AHDL top level. Why is that?
Surely a Verilog top level would make the design more usable. AHDL is Altera only as far as I can tell. It also precludes using the Prop Verilog from simulators such as Icarus or Verilator.
e.g. "2015-07-22 - (Jac Goudsmit) Fixed bug in PLL simulator ('&' in original source should be '|')"
It's been a while since I looked. I thought that someone had Xilinx targets, and that should address the top level AHDL. Edited to add: maybe that was in this now defunct repository https://github.com/jacgoudsmit/P8X32A_Emulation
Actually now that I've gone through the AHDL code I can tell you it's incredibly straightforward, and I believe it would be trivial to port it to a verilog format. The only complex element is the PLL instantiation:
100% of the rest of the code is just simple pin and data assignments.
I'm pretty sure the reason for the AHDL is because the Digilent boards were just the best suited to hold the Propeller so they tailored the source to them. I'm not familiar at all with Icarus or Verilator though.
Thanks for the heads up. I'm pretty sure I pulled from the most up-to-date repo, but I'll make sure to double check.
One would also have to port the tim.tdf AHDL file, which generates all of the clock and counter signals, but I don't see any reason it would be difficult to either:
"top" and "tim" are the only two AHDL files I see, however I don't know for sure if any of the other Propeller-specific files (e.g. not the Quartus project file, etc.) are only compatible with Quartus.
Here're my files if you're interested, maybe something will jump out at you.
Yes you should really use my P1V repository at https://github.com/jacgoudsmit/P1V. It has bug fixes that Chip Gracey himself posted in the forums, all the AHDL files were converted to Sysverilog, and I made some other improvements such as making it unnecessary to maintain 3 or more copies of the same code. All of this was originally based on Parallax's P1V repository and I filed pull-requests in the past to integrate my changes but got no response, so the Parallax P1V repo still has the bugs.
Before Parallax set up their own Github account, @MindRobots and others put the P1V sources into Github. I forked that repository and we did quite a bit of work in there, including extra features such as implementation of port B. The latest version of that still exists at https://github.com/jacgoudsmit/P8X32A_Emulation. It also had several supported Xilinx targets but they weren't integrated into the main tree yet (they were in separate subdirectories; you'll find them). The repo has been sort of abandoned until I have some time and motivation to integrate some changes into the P1V repo. I recently learned that it's possible to merge repos together, I might give that a try in the future but I'm very busy at work and on other projects.
So for now, the only Xilinx target that's supported in the P1V repo is the Arty board by Digilent (with a Xilinx FPGA). Unfortunately, the entire Propeller doesn't fit into the FPGA on the Arty so I had to reduce the number of cogs. It's not really clear to me why it didn't fit; I suspect that the problem can be solved by tweaking the settings of the Xilinx software.
===Jac