Commit Graph

  • d2ba06b255 Added Hazard Unit file (tested compiling correctly) labelled variables inside off of the Assignment 3 Questions PDF Figure 2. Also have a placeholder MUX to place before the ALU for adding hazard unit functionality main TroubleElectrical 2026-11-08 12:32:40 +11:00
  • fe53955748 Fixed bug in test code where there was a hazzard, despite testing assuming no hazzard. Updated testbench to reflect this (Ln57-62). Added mem[0x000] to log message when printing registers. Replaced 8 delay with explicit 5x 2 delays. (NOTE: Needed an extra one for ensuring write-back when comparing results. Fixed bug where the wrong registers were being added together when creating the comparison point in the testbench. Fixed testbench bug where S4 was checked twice and S5 not checked at all. Updated display message on test failure to reflect that it is the pipelined version, not the single-cycle. riley 2026-11-05 16:15:06 +11:00
  • de1f346f64 Updated assignment3 instruction counter code to be more consistent with other modules riley 2026-11-05 15:46:05 +11:00
  • c894488c44 Fixed ByteIM.sv and removed seven seg from A3 code TroubleElectrical 2026-11-05 14:33:41 +11:00
  • 74a15cf038 Made ROM binary file configurable via a parameter. Updated assignment2 and assignment3 to reflect this. Added bit slicing in assignment2 for ram/rom addresses. riley 2026-11-05 14:27:01 +11:00
  • 00b2087860 Added project to modelsim TroubleElectrical 2026-11-05 14:25:34 +11:00
  • 38fa35fccd Fixed initialisation bug and compilation error in gatereg module. Added mips_pipelined to test suite. Fixed several bugs in assignment3 MIPS module riley 2026-11-05 14:10:13 +11:00
  • cc98bfbf02 Fixed compile error caused by trailing comma riley 2026-11-05 12:25:01 +11:00
  • f8ea90e41d Created assignment 3 MIPS module that uses pipelining riley 2026-11-04 17:28:36 +11:00
  • 704286f0e6 Renamed MIPS test to be a single cycle test riley 2026-11-04 15:42:52 +11:00
  • ef6bd3aec9 Added test assemblies for assignment 3 / pipelining riley 2026-11-04 15:42:22 +11:00
  • 8f9ec010ac Updated gate register module to support arbitary delays to prevent littering uper-level code with gatereg->gatereg logic values. riley 2026-11-04 15:40:25 +11:00
  • b046ad7db0 Created register for gating pipeline stage results riley 2026-10-29 15:27:05 +11:00
  • 8b48084fa5 Repaired Sign extender module again to ensure only combinational logic used (There was a compilation error before, also compiled and tested code on board) TroubleElectrical 2026-10-22 15:53:15 +11:00
  • 973b9260b6 Fixed (maybe bug) in demo program where program branches back to prior instruction. riley 2026-10-20 16:21:55 +11:00
  • 5eb78e92e9 Fixed bugs in sign extender riley 2026-10-20 16:14:02 +11:00
  • b52f01c3be Added some delay to better test final branch/halt. riley 2026-10-20 16:02:40 +11:00
  • 9648db6e77 Switched to used boolean && rather than bitwise & in sign extender riley 2026-10-20 16:02:14 +11:00
  • a647305bd9 Fixed bug where ram datawidth was not 2^N. riley 2026-10-20 16:01:34 +11:00
  • fb97155731 Added Assignment 2 submission zip file TroubleElectrical 2026-10-16 15:09:48 +11:00
  • d962a1b557 Added code to display current PC, Removed Blanking from 7seg 4 digits, Changed reset to a switch rather than button Compiled working version for board TroubleElectrical 2026-10-16 14:27:29 +11:00
  • 91a5090528 Added Changes to ModelSim from Modules folder (and small fix for ../hexfile path) TroubleElectrical 2026-10-16 12:59:50 +11:00
  • 2f652705cc Fixed timing in testbench for branch iteration. riley 2026-10-16 12:51:21 +11:00
  • 59f7f372f6 Fixed bug where ASU intermediate was being treated as the overflow flag rather than an intermediate. riley 2026-10-16 12:33:04 +11:00
  • e7fff9f3dc Added explicit rst input to RAM and PC as well as the MIPS processor. riley 2026-10-16 12:11:19 +11:00
  • c717bf189c Added comment to document the zero-flag riley 2026-10-16 11:57:55 +11:00
  • 5ae9125e06 Fixed a couple bugs introduced from merge-conflict resolution riley 2026-10-16 11:50:07 +11:00
  • 8a682347f0 Merge branch 'main' of ssh://git.rileyk.au:19482/TroubleElectrical/FPGA_Uni riley 2026-10-16 11:43:43 +11:00
  • 559ff01d69 Fixed printing annoyance. Added variable dumping to a wavefile. Updated delay to 2 units (as there is 1 unit of clk being high and 1 unit low). Removed register initialisation code from testbench. Fixed typo when wanting to check T0 (R8) but was checking R0. Added explicit if-else begin-end blocks to logging and a simulation exit when the testbench is done. riley 2026-10-16 11:41:33 +11:00
  • 92a0cb17da Updated assignment 2 to reflect prior changes. Fixed instruction ordering for register file module (again). Fixed typo that limited the space the ALU could write its flags out to. Swapped ordering to be correct when determining if we are storing the result from ALU or MEM. Added a QUARTUS_SYNTH around the display logic at the end of the module. Partially fixed control_unit module, still seems to need some changes as branching doesn't appear to work at all. riley 2026-10-16 11:38:35 +11:00
  • 65be2c2d61 Made sign extension explicit to remove bit indexing (which iverilog doesn't like) and a tad more readable. riley 2026-10-16 11:35:24 +11:00
  • 878f949e5f Made addrwidth sizing consistent with the 2^N used everywhere riley 2026-10-16 11:34:31 +11:00
  • 0ea3e0fa12 Added initialisation blocks for PC and GPR's riley 2026-10-16 11:33:45 +11:00
  • 5d9e7f541e Updated RAM code to make sure Bus width is 32 bits TroubleElectrical 2026-10-16 11:32:47 +11:00
  • 12ae58ad86 Removed flag assignment from within ALU OP case statement and instead perform it at the end. Made bit index for the ASU OP more explicit. riley 2026-10-16 11:32:24 +11:00
  • 4c7e2ff085 Fixed instruction width issue in ROM. Stripped all comments to form minimal HEX file to rule out possible parser issues. riley 2026-10-16 11:29:04 +11:00
  • dca673b039 Added files into modelsim folder TroubleElectrical 2026-10-16 10:10:37 +11:00
  • 8ed06d38e1 Merge branch 'main' of ssh://git.rileyk.au:19482/TroubleElectrical/FPGA_Uni riley 2026-10-16 03:55:57 +11:00
  • 103aa769fd Added testbench for MIPS processor riley 2026-10-16 03:53:14 +11:00
  • 19e5843d55 Added testbench for MIPS processor riley 2026-10-16 03:53:14 +11:00
  • a63d46bc77 Merge branch 'main' of ssh://git.rileyk.au:19482/TroubleElectrical/FPGA_Uni riley 2026-10-15 15:54:38 +11:00
  • 04d1d3e2fe Added control unit. TODO: Test riley 2026-10-15 15:53:59 +11:00
  • cdde70e6c2 Updated ram.sv to resolve compilation error TroubleElectrical 2026-10-15 15:42:26 +11:00
  • cd7fecd1c4 Updated code such that it will compile TroubleElectrical 2026-10-15 15:32:15 +11:00
  • 5fc24f7859 Temp change to make RAM word-aligned riley 2026-10-15 15:28:27 +11:00
  • 2e042fbd93 Merge branch 'main' of ssh://git.rileyk.au:19482/TroubleElectrical/FPGA_Uni riley 2026-10-15 15:18:09 +11:00
  • a336df9d80 Reworked CPU to use control unit riley 2026-10-15 15:16:57 +11:00
  • afb6fefe1b Updated Assignment2 with better register file module insantiation TroubleElectrical 2026-10-15 15:07:41 +11:00
  • 10bf499065 Merge branch 'main' of ssh://git.rileyk.au:19482/TroubleElectrical/FPGA_Uni TroubleElectrical 2026-10-15 14:52:14 +11:00
  • 8c6765eb83 Updated reg file and assignment for compilation TroubleElectrical 2026-10-15 14:49:32 +11:00
  • 1c93c082ae Merge branch 'main' of ssh://git.rileyk.au:19482/TroubleElectrical/FPGA_Uni riley 2026-10-15 14:48:06 +11:00
  • d9f44f93df Halfway added imm,branch and mem ops riley 2026-10-15 14:46:51 +11:00
  • ac1062fbd5 Added Register Display Code TroubleElectrical 2026-10-15 14:35:10 +11:00
  • 81c05b6531 Merge branch 'main' of ssh://git.rileyk.au:19482/TroubleElectrical/FPGA_Uni TroubleElectrical 2026-10-15 14:27:48 +11:00
  • 6bb6368f6c Added external register inspection code TroubleElectrical 2026-10-15 14:23:38 +11:00
  • 25ed477df9 Rewrote ternary operator to be less confusing riley 2026-10-15 14:04:36 +11:00
  • 1e13de9301 Updated assignment2. Created file for testing R-type instructions, still needs to be implemented. Consider using bind to be able to extract inner-scoped variables out for inspection. riley 2026-10-13 22:26:52 +11:00
  • ac6c4cc094 Added module for sign extension. Needs test cases riley 2026-10-13 22:24:43 +11:00
  • 75ef513efa Added zero flag to ALU and updated testbench to not fail because of it. TODO: Add cases to test the zero flag riley 2026-10-13 21:34:25 +11:00
  • 80416e1f8a TODO: Remove Shifter Code TroubleElectrical 2026-10-13 16:57:03 +11:00
  • 25a953cdc6 Added 4 digit 7seg display module (confirmed working for now), Added Inputs for displaying registers / Program Counter high and low bits, Assigned pins for Display digits, inputs (Labeled HID) and the clk button TroubleElectrical 2026-10-13 16:32:15 +11:00
  • 353923eadf Updated Assignment to remove ../../ includes (unnesccesary, also SYNTHESIS macro is not used by quartus, so I manually have QUARTUS_SYNTH for those includes) TroubleElectrical 2026-10-13 15:12:00 +11:00
  • 19b07b649d Repaired last few errors in modules and ensured compilation with QUARTUS_BUILD global flag in Quartus build settings and compiled fully (no errors other than pin assignments) TroubleElectrical 2026-10-13 13:24:44 +11:00
  • f91fe0681a Fixed parameter ordering in instancing riley 2026-10-13 12:45:15 +11:00
  • a04d6b92cb Updated register file to use 2^n rather than n riley 2026-10-13 12:43:53 +11:00
  • ba9ab863d8 Fixed ordering for instruction counter and added module output gating for writing riley 2026-10-13 12:33:24 +11:00
  • 6d731b5a6b Merge branch 'main' of ssh://git.rileyk.au:19482/TroubleElectrical/FPGA_Uni riley 2026-10-13 12:29:52 +11:00
  • b9623569cf Partially implemented R-type instructions (still need to write rd values) riley 2026-10-13 12:26:26 +11:00
  • e57e8f362a Updated assignment 2 dependency modules (currently 8 errors in compile) TroubleElectrical 2026-10-13 12:23:52 +11:00
  • 8675f5b8ee Made Assignment 2 Quartus Project TroubleElectrical 2026-10-13 12:03:55 +11:00
  • 979f12b692 Added zero initialization for r0 riley 2026-10-12 21:29:07 +11:00
  • 1faa7fc3f0 Updated ram and rom modules so that naming is more consistent riley 2026-10-12 11:49:35 +11:00
  • 96ecc8553c Merge branch 'main' of https://git.rileyk.au/TroubleElectrical/FPGA_Uni riley 2026-10-08 15:58:16 +11:00
  • dacc49efac TODO riley 2026-10-08 15:58:06 +11:00
  • b49e294b7d Updated register_file.sv with proper naming scheme and 32bit width TroubleElectrical 2026-10-08 15:04:38 +11:00
  • 102d5b4b7a Updated RAM interface to be more inline with ROM interface riley 2026-10-08 14:56:52 +11:00
  • ab561dd510 Implemented RAM. Possible issue by using async assignments in initial begin. riley 2026-10-08 14:55:28 +11:00
  • 016fb874e7 Set rom to point to example program riley 2026-10-08 14:22:00 +11:00
  • 76cd7931b6 Realized that, while the assembled is not binary, it is still loadable by verilog. riley 2026-10-08 14:18:11 +11:00
  • 0ef2aeeb48 Added instruction counter and register file riley 2026-10-08 14:13:38 +11:00
  • 5cb48095ce Merge branch 'main' of https://git.rileyk.au/TroubleElectrical/FPGA_Uni riley 2026-10-08 14:12:56 +11:00
  • aab18425f9 Added test assembly code riley 2026-10-08 14:08:35 +11:00
  • 9e3525fcac Added Byte addressable ROM from Slides TroubleElectrical 2026-10-06 16:28:23 +11:00
  • 3145dd6a21 Added ROM file from MIPS Architecture Slide Part 1 TroubleElectrical 2026-10-06 16:03:03 +11:00
  • 179eb469c4 Removed seven segment code from alu and asu TroubleElectrical 2026-09-24 15:37:48 +10:00
  • 3af4bfc875 Added attribution to submission files assignment-1-submission riley 2026-09-16 13:35:35 +10:00
  • 64cd876f12 Added attribution for submission files TroubleElectrical 2026-09-16 13:01:43 +10:00
  • cbb5bb917a Added Q6 submission TroubleElectrical 2026-09-16 12:56:48 +10:00
  • ae8ac98e8d Added Q5 comments and sumbission TroubleElectrical 2026-09-16 12:54:18 +10:00
  • 13f34e62c6 Added Q4 sumbission and comments TroubleElectrical 2026-09-16 12:50:58 +10:00
  • 7d489ab77c Added Q3 sumbission and integrated all includes TroubleElectrical 2026-09-16 12:42:28 +10:00
  • 56ade6b426 Added comments to Logic Unit (Q2) and added to submission file TroubleElectrical 2026-09-16 12:38:06 +10:00
  • 0947f26727 Added comments to Q1 code and made submission file TroubleElectrical 2026-09-16 10:33:08 +10:00
  • 00167dabc8 Updated ModelSim Files TroubleElectrical 2026-09-16 10:15:08 +10:00
  • 900b544bc6 Added python script for invoking icarus verilog. This script has three subcommands; submit, test_submit and test. test is equivalent to the run.bat shell script, submit generates a single-file verilog source suitable for submission. test_submit will run all generated submission testbenches to verify that nothing was broken. Renamed submission folder to fix typo. riley 2026-09-15 22:00:02 +10:00
  • 6a518dcd42 Merge branch 'main' of ssh://git.rileyk.au:19482/TroubleElectrical/FPGA_Uni Merged incomming changes riley 2026-09-15 21:29:54 +10:00
  • 392f1f7a27 Updated shifter testbench to work with 2^n widths rather than bitwidths. riley 2026-09-15 21:29:47 +10:00
  • 287fc1903d Updated default ASU testbench width to be 4-bit to align with seven segment width for demo riley 2026-09-15 21:28:01 +10:00
  • 19cd7ac177 Updated ALU and ASU modules to conditionally require seven-segment output logic. Used for the assignment 1 demo and MUST be stripped for assignment 2. riley 2026-09-15 21:27:04 +10:00
  • afa8d9d4db Enabled 2 segments for seven seg display decoder (Q1), most code just needs comments TroubleElectrical 2026-09-15 21:08:40 +10:00