1- # BProC CLI - Basic Processors Compiler Command Line Interface #
2- ## Description ##
3- BProC is a compiler for basic processor designs, it uses assembly code written in ` .baspm `
1+ ![ ] ( ./src/main/resources/img/bproc_logo_h128.png )
2+ # BProC CLI - Basic Processors Compiler Command Line Interface
3+
4+ ## Table of contents
5+ * [ Table of contents] ( #table-of-contents )
6+ * [ Description] ( #description )
7+ * [ Installation] ( #installation )
8+ * [ Package install] ( #package-install )
9+ * [ JAR run] ( #jar-run )
10+ * [ Prerequisites] ( #prerequisites )
11+ * [ Run the .jar file] ( #run-the-jar-file )
12+ * [ Usage] ( #usage )
13+ * [ Arguments] ( #arguments )
14+ * [ Actions] ( #actions )
15+ * [ Options] ( #options )
16+ * [ Other arguments] ( #other-arguments )
17+ * [ Supported instruction set] ( #supported-instruction-set )
18+ * [ Keywords] ( #keywords )
19+ * [ TODO] ( #todo )
20+ * [ Credit] ( #credit )
21+
22+ ## Description
23+ BProC is a compiler for basic processor designs, it uses assembly code written in ` .bpasm `
424files. BProC-CLI is a simple command line interface for compiling assembler files ` .bpasm `
525for basic processors intended for education use. The vision of the project is to provide
626simple way to generate RAM programs while designing basic processors.
727The project, as it is, provide a rigid instruction set, but the goal is to provide a
828configurable instruction set.
929
10- ## Installation ##
30+ ## Installation
1131Choose one of the options available:
12- - Pakage install
13- - JAR run
14- ### Package install ###
15- 1 . Download one of the packages suitable for your device in the release
16- section : <a href =" https://github.com/jugubell/bproc-cli/releases " >Release section</a >
32+ - [ Package install] ( #package-install )
33+ - [ JAR run] ( #jar-run )
34+ ### Package install
35+ 1 . Download one of the packages suitable for your device in the Release Section
17362 . Install the package with dnf/apt or execute installer on Windows.
1837 - Supported packages: rpm, deb, exe.
19- - Supported architectures: x86_64, aarch64
38+ - Supported architectures: x86_64, aarch64/amd64
2039
21- ### JAR run ###
22- #### Prerequisites ####
40+ ### JAR run
41+ #### Prerequisites
2342Java 8 or later runtime is needed to run the compiler. To verify,
2443in the terminal run ` java -version ` or ` java --version ` .
25- Otherwise, install the JRE for your device from < a href = " https://adoptium.net/en-GB/temurin/releases?version=21 " >here</ a > .
44+ Otherwise, install the JRE for your device from * Eclipse Adoptium * [ here ] ( https://adoptium.net/en-GB/temurin/releases?version=21 ) .
2645
27- #### Run the .jar file ####
46+ #### Run the .jar file
2847The ` .jar ` file provided can be used to compile ` .bpasm ` assembly files in a terminal:
29- 1 . Download the ` .jar ` file from the < a href = " https://github.com/jugubell/bproc-cli/releases " > Release section</ a >
48+ 1 . Download the ` .jar ` file from the Release section.
30492 . Run with: ` java -jar bproc-cli.jar <argument(s)> `
3150
32- ## Usage ##
51+ ## Usage
3352Here is how to use the BProC-CLI:
3453```
3554bproc [-action <inputFile (*.bpasm)>] [optional -output <outputFileName/outputDirectory>] [optional --option <compileType>]
@@ -38,30 +57,30 @@ If you're using the JAR file:
3857```
3958java -jar bproc-cli.jar [-action <inputFile (*.bpasm)>] [optional -output <outputFileName/outputDirectory>] [optional --option <compileType>]
4059```
41- #### Arguments ####
42- - inputFile (* .bpasm): A valid assembler file absolute or relative path with ` .bpasm ` extension.
43- - outputFileName/outputDirectory: A valid output directory, if the name file
60+ #### Arguments
61+ - ** inputFile (* .bpasm)** : A valid assembler file absolute or relative path with ` .bpasm ` extension.
62+ - ** outputFileName/outputDirectory** : A valid output directory, if the name file
4463is not provided, it will be generated.
45- - compileType [ binary|hexv3 ] : Type of compilation : default 'binary'
64+ - ** compileType** : Type of compilation : default 'binary'
4665
47- #### Actions ####
66+ #### Actions
4867- ` -s ` : verify syntax.
4968- ` -g ` : verify syntax, compile then generate the compiled code.
5069- ` -o ` : verify syntax, compile and save the compiled code to a file
5170
52- #### Options ####
53- - ` --bin ` : compiles to binary [ value by default]
71+ #### Options
72+ - ` --bin ` : compiles to binary ( value by default)
5473- ` --hex ` : compiles to hexadecimal
5574- ` --hexv3 ` : compiles to hexadecimal version 3 format (compatible for Logisim RAM)
5675- ` --vhdl ` : compiles to a portion of VHDL RAM initialization signal
5776- ` --vrlg ` : compiles to a portion of Verilog RAM initial bloc
5877
59- #### Other arguments ####
78+ #### Other arguments
6079- ` --help ` , ` -h ` , ` help ` : shows the help.
6180- ` --version ` , ` -v ` , ` version ` : shows the version.
6281- ` --instruction-set ` , ` --is ` : shows the supported instruction set.
6382
64- ## Supported Instruction Set ##
83+ ## Supported Instruction Set
6584This table recapitulate the current supported instruction set.
6685
6786| Instruction | Op code | Type | Needs an operand | Description |
@@ -89,19 +108,21 @@ This table recapitulate the current supported instruction set.
89108| *** WOR*** | 0xF400 | Hardware | No | Write output register (GPIO out) |
90109| *** SFI*** | 0xF200 | Hardware | No | Skip the next instr. if flag FGI = 1 (Input reading flag) |
91110| *** SFO*** | 0xF100 | Hardware | No | Skip the next instr. if flag FGO = 0 (Output writing flag) |
92- | *** LDD*** | 0xF080 | Software | No | Load data in immediate mode |
111+ | *** LDD*** \* | 0x0000 | Software | Yes | Load data in immediate mode |
93112| *** JMP*** | 0x0000 | Software | No | Jump to label in assembly code |
113+ \* Not yet supported (instead, use .data declaration combined with LDA)
94114
95- ## Keywords ##
115+ ## Keywords
96116There are 2 keywords :
97117 - ` .data ` : for data declaration in RAM
98118 - ` start: ` : label to indicate the program start. This label is put after data declaration
99119 - ` 0x ` prefix or ` h ` suffix : for addresses and values in hexadecimal
100120
101- ## TODO ##
102- 1 . Integrate an SQLite database to manage a custom instruction set and configurations.
103- 2 . Extend RAM use to custom RAM capacity.
104- 3 . Enable software instruction from one or more hardware instruction.
121+ ## TODO
122+ 1 . Add LDD instruction support for immediate addressing
123+ 2 . Integrate an SQLite database to manage a custom instruction set and configurations.
124+ 3 . Extend RAM use to custom RAM capacity.
125+ 4 . Enable software instruction from one or more hardware instruction.
105126
106- ## Credit ##
127+ ## Credit
107128Default instruction set mostly inspired from PhD lab work at University of Blida.
0 commit comments