-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2 from ArvinDelavari/main
AssembleX V3.0
- Loading branch information
Showing
39 changed files
with
1,488 additions
and
1,462 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
main: | ||
li sp, 0xffc | ||
addi sp, sp, -48 | ||
sw s0, 44(sp) | ||
addi s0, sp, 48 | ||
sw zero, -20(s0) | ||
li a5, 1 | ||
sw a5, -24(s0) | ||
li a5, 10 | ||
sw a5, -32(s0) | ||
sw zero, -28(s0) | ||
j .L2 | ||
.L3: | ||
lw a4, -20(s0) | ||
lw a5, -24(s0) | ||
add a5, a4, a5 | ||
sw a5, -36(s0) | ||
lw a5, -24(s0) | ||
sw a5, -20(s0) | ||
lw a5, -36(s0) | ||
sw a5, -24(s0) | ||
lw a5, -28(s0) | ||
addi a5, a5, 1 | ||
sw a5, -28(s0) | ||
.L2: | ||
lw a4, -28(s0) | ||
lw a5, -32(s0) | ||
blt a4, a5, .L3 | ||
li a5, 0 | ||
mv a0, a5 | ||
lw s0, 44(sp) | ||
addi sp, sp, 48 |
24 changes: 14 additions & 10 deletions
24
...ly_Codes/fibonacci/fibonacci_firmware.hex → ...ly_Codes/fibonacci/fibonacci_firmware.hex
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
addi x1, x0, 0x07f9 | ||
|
||
addi x12, x0, 25 | ||
addi x13, x0, 12 | ||
|
||
mul x14, x12, x13 | ||
addi x2, x0, 0x07f9 | ||
|
||
ebreak |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
7f900093 | ||
01900613 | ||
00c00693 | ||
02d60733 | ||
7f900113 | ||
00100073 | ||
00100073 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
addi x12, x0, 101 | ||
add x13, x0, x0 | ||
add x14, x0, x0 | ||
LOOP: | ||
add x14, x13, x14 | ||
addi x13, x13, 1 | ||
blt x13, x12, LOOP | ||
sw x14, 100(x0) | ||
ebreak |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,5 +4,5 @@ | |
00e68733 | ||
00168693 | ||
fec6cce3 | ||
0ce02423 | ||
00100073 | ||
06e02223 | ||
00100073 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,51 +1,38 @@ | ||
![License](https://img.shields.io/github/license/phoeniX-Digital-Design/AssembleX?color=dark-green) | ||
![Test](https://img.shields.io/badge/tests-passed-dark_green) | ||
![Integration with phoeniX project](https://img.shields.io/badge/integration_with_phoeniX-in_progress-blue) | ||
![RV32](https://img.shields.io/badge/integration_with_phoeniX-IM-blue) | ||
|
||
AssembleX V2.0 | ||
AssembleX V3.0 | ||
=============== | ||
|
||
<div align="justify"> | ||
|
||
This repository contains full Python source codes of `AssembleX`, the assembly code executant software for [phoeniX RISC-V processor](https://github.com/phoeniX-Digital-Design/phoeniX) which is written in Verilog, at Electronics Research Center of Iran University of Science and Technology. AssembleX is now working with the help of [riscv-assembler](https://github.com/celebi-pkg/riscv-assembler) software. | ||
This repository contains source codes of `AssembleX`, the assembly code executant software for the [phoeniX RISC-V processor](https://github.com/phoeniX-Digital-Design/phoeniX) which is implemented in Verilog, at Electronics Research Center of Iran University of Science and Technology. AssembleX is powered by [riscv-assembler](https://github.com/celebi-pkg/riscv-assembler) and [PQR5ASM](https://github.com/iammituraj/pqr5asm) open-source projects. Current version of AssembleX supports `RV32IM` extenstions of standard RISC-V ISA. | ||
|
||
AssembleX repository contains an open source software under the [GNU V3.0 license](https://en.wikipedia.org/wiki/GNU_General_Public_License) and is free to use. | ||
This repository contains an open source software under the [GNU V3.0 license](https://en.wikipedia.org/wiki/GNU_General_Public_License) and is free to use. | ||
|
||
- Contact phoeniX Team : phoeniX.Digital.Electronics@gmail.com | ||
- Contact Us: phoeniX.Digital.Electronics@gmail.com | ||
- Iran University of Science and Technology - Electronics Research Center | ||
- Digital Design Research Lab, SCaN Research Lab - Fall 2023 | ||
- Digital Design Research Lab, SCaN Research Lab - Summer 2024 | ||
|
||
</div> | ||
|
||
### Running Sample Codes | ||
### How to use AssembleX | ||
<div align="justify"> | ||
|
||
Before running the script, note that the assembly code must be saved in the project directory with the same name. | ||
To run any of these sample projects simply run python `AssembleX.py sample` followed by the name of the project passed as a variable named project to the Python script. | ||
The input command format for the terminal follows the structure illustrated below: | ||
In order to run your own code on phoeniX, create a directory named to your project such as `/my_project` in `/Assembly_Codes/`. Put all your `user_code.s` files in my_project and run the following command from the main directory: | ||
``` | ||
python AssembleX.py sample {project_name} | ||
``` | ||
For example: | ||
``` | ||
python AssembleX.py sample fibonacci | ||
``` | ||
After execution of this script, firmware file will be generated and this final file can be directly fed to our Verilog testbench. AssembleX automatically runs the testbench and calls upon gtkwave to display the selected signals in the waveform viewer application, gtkwave. | ||
</div> | ||
|
||
### Running Your Own Code | ||
<div align="justify"> | ||
|
||
In order to run your own code on phoeniX, create a directory named to your project such as `/my_project` in `/Software/User_Codes/`. Put all your ``user_code.s` files in my_project and run the following command from the main directory: | ||
``` | ||
python AssembleX.py code my_project | ||
python AssembleX.py my_project_directory/my_project.s | ||
``` | ||
Provided that you name your project sub-directory correctly the AssembleX software will create `my_project_firmware.hex` and fed it directly to the testbench of phoeniX processor. After that, iverilog and GTKWave are used to compile the design and view the selected waveforms. | ||
|
||
</div> | ||
|
||
<div align="justify"> | ||
> [!NOTE]\ | ||
> AssembleX V3.0 is not integrated within the [phoeniX](https://github.com/phoeniX-Digital-Design/phoeniX) project repository yet. Currently phoeniX core is working with AssembleX V1.0 which is using the assistance of Venus Simulator VS code extension. **phoeniX** RISC-V processor will be empowered by **AssembleX V3.0** in the upcoming updates very soon! | ||
|
||
> [!NOTE]\ | ||
> AssembleX V2.0 is not integrated within the [phoeniX](https://github.com/phoeniX-Digital-Design/phoeniX) project repository yet. Currently phoeniX core is working with AssembleX V1.0 which is using the assistance of Venus Simulator VS code extension. **phoeniX** RISC-V processor will be empowered by **AssembleX V2.0** in the upcoming updates very soon! | ||
> Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted, provided that the above copyright notice and this permission notice appear in all copies. | ||
</div> | ||
Copyright 2024 Iran University of Science and Technology. <phoenix.digital.electronics@gmail.com> |
This file was deleted.
Oops, something went wrong.
18 changes: 0 additions & 18 deletions
18
Sample_Assembly_Codes/binary_search/binary_search_firmware.hex
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.