Shop OBEX P1 Docs P2 Docs Learn Events
Getting organized, part 2: Quartus Revisions, Preprocessor Macros and Parameters — Parallax Forums

Getting organized, part 2: Quartus Revisions, Preprocessor Macros and Parameters

jac_goudsmitjac_goudsmit Posts: 418
edited 2014-09-01 01:56 in Propeller 1
Howdy folks!

As a follow-up on my previous thread about getting the Github repos organized, here's what I did in my Altera branch (I'll leave the master branch alone until this gets enough approval)
  • I combined the source files of the Altera projects into one Quartus Project File (Altera.qpf), and used the orginal .qsf files to create three Revisions: one for the BeMicro CV, one for the DE0-Nano and one for the DE2-115.
  • Added an `ifdef / `endif to hub_mem.v to make it possible for the DE0-Nano to disable the character ROM. That way, all the boards use the exact same source files without the need to comment that line in or out.
  • Added a parameter to the dig.v file to make it possible to invert the LED outputs: On the BeMicroCV, the LEDs are on when the outputs are low, so it's the only configuration the overrides the parameter to nonzero.
I built the output for all targets of course, and made sure that I could successfully produce the output files that would normally be downloaded to the boards, without clashing file names. However I can't test on all targets, all I have is a BeMicroCV.

I also used BeyondCompare3 to make sure that I wasn't missing anything, and the source files really WERE the same between the different Altera targets. I also made sure that the new .qsf files were one-to-one copies of the old top.qsf files. I even compared the .sof output files from the old builds against the new builds and made sure they were the same. I also changed the .cof (conversion files) to use the new output_dir to find its input files and store its output files.

I tested various scenarios adding and removing the macro and parameter in the BeMicroCV configuration to make sure that it's working as expected. I'm pretty confident that my Altera tree generates the exact same output for all three Cyclone IV/V targets as the original archive (after the boot bug was fixed), but I can't test this because all I have is the BeMicroCV. If anyone can verify that the tree works as expected on a DE0-Nano and DE2-115, I would really appreciate it. Thanks!

See https://github.com/jacgoudsmit/P8X32A_Emulation/tree/Altera

===Jac

Comments

  • Cluso99Cluso99 Posts: 18,069
    edited 2014-08-31 19:04
    Jac,
    Your work is appreciated.
    Unfortunately I know nothing about git - absolutely nothing! Not even sure how to download the files.

    However, I have done 2 changes that IMHO ought to be included...
    1. Comments - I added comments to the master code (the reset bug fixed release for DE0)
    2. Removal of the unscrambling, new ROM code for booter/interpreter/runner, and replacement by RAM, increased hub RAM

    If you agree, your thoughts about how to integrate this.

    Also, perhaps heaters tab replacements too???
  • jac_goudsmitjac_goudsmit Posts: 418
    edited 2014-09-01 01:38
    Cluso99 wrote: »
    Unfortunately I know nothing about git - absolutely nothing! Not even sure how to download the files.

    If you simply want to download the files without setting up Github, you can simply go to my Altera branch page and click the "Download Zip" button on the right, even if you don't have a Github account.
    However, I have done 2 changes that IMHO ought to be included...
    1. Comments - I added comments to the master code (the reset bug fixed release for DE0)

    I'm pretty sure the reset bug fix was added by either Heater or Mindrobots as soon as it showed up.

    The comments are definitely on the list of things to add.
    2. Removal of the unscrambling, new ROM code for booter/interpreter/runner, and replacement by RAM, increased hub RAM

    Yes, yes and yes! There's no question all of these should be added. As I mention in the readme file in Github, I want to make these features conditional upon macro definitions and/or parameter overrides, so that the default compilation output remains as close to the original Propeller as possible.
    Also, perhaps heaters tab replacements too???

    The tab-to-space conversions are already in the repository and aren't going anywhere :-)
    If you agree, your thoughts about how to integrate this.

    I think because your changes were based on an earlier version of the code, it's probably easiest if I simply get the ZIP files from the forum and merge your changes with mine. Then, depending on whether you want to invest some time in setting up Github on your system and getting to know it, or not, we can do two things: Either I check in the changes in my branch (and give you credit for them of course) or I send you the modified files, and you can fork my branch, drop the files in your workspace and commit the changes under your own name. It's up to you; just let me know what you want to do.

    Using Github is not really that difficult, you can probably learn all the essentials in one afternoon or evening from an online beginners tutorial (Google is your friend). I recommend starting with the Github tool for Windows application (there's a Mac version too). The tool can't do everything that's possible with Git/Github but it has all the basic functionality to get started.

    The difficult part of source control is merging changes from people that worked on the same source files at the same time, and you won't have to worry about that, that will be my task.

    ===Jac
  • overclockedoverclocked Posts: 80
    edited 2014-09-01 01:56
    I second that! Good to include these fixes as well. In the Xilinx-tree (which haven't been tocuhed here) some of these are already included.

    But it would be good to have at least the ROM code switchable, thus including the full ROM code at will. The current unscrabled code excludes the Font/Sine and maybe something more. It would be more complete to include everything I think. Otherwise the new "fix" isn't a full replacement.
Sign In or Register to comment.