Skip to content

Commit

Permalink
Merge pull request #58 from wepsim/master
Browse files Browse the repository at this point in the history
2.3.0: minor updates
  • Loading branch information
acaldero authored Oct 12, 2023
2 parents a2bfad7 + 23da8ff commit 638cc52
Show file tree
Hide file tree
Showing 7 changed files with 16 additions and 57 deletions.
11 changes: 0 additions & 11 deletions repo/examples_set/rv32/default.json
Original file line number Diff line number Diff line change
Expand Up @@ -1021,16 +1021,5 @@
"assembly": "s6e1",
"description": "<span data-langkey='example_06_01'>Test example.</span>",
"testing": true
},
{
"id": "R5E2",
"title": "IEEE 754 (32 bits)",
"type": "<span data-langkey='Special'>Special</span>",
"modes": "newbie,intro,rv",
"hardware": "rv",
"microcode": "rv_base",
"assembly": "s6e7",
"description": "<span data-langkey='example_01_01'>Simple example with fetch, arithmetic instructions, and basic .text segment.</span>",
"testing": true
}
]
11 changes: 0 additions & 11 deletions repo/examples_set/rv32/es_rv.json
Original file line number Diff line number Diff line change
Expand Up @@ -86,16 +86,5 @@
"assembly": "s6e1",
"description": "<span data-langkey='example_06_01'>Test example.</span>",
"testing": true
},
{
"id": "R5E2",
"title": "IEEE 754 (32 bits)",
"type": "<span data-langkey='Special'>Special</span>",
"modes": "newbie,intro,rv",
"hardware": "rv",
"microcode": "rv_base",
"assembly": "s6e7",
"description": "<span data-langkey='example_01_01'>Simple example with fetch, arithmetic instructions, and basic .text segment.</span>",
"testing": true
}
]
3 changes: 2 additions & 1 deletion repo/microcode/rv32/rv_min.mc
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
# WepSIM (https://wepsim.github.io/wepsim/)
#

firmware_version=2,
begin
{
fetch: # IR <- MP[PC]
Expand All @@ -14,7 +15,7 @@ begin
}

test {
co=010110,
oc(6:0)=0010110,
nwords=1,
{
(),
Expand Down
23 changes: 12 additions & 11 deletions sim_sw/assembly/README_ng.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,26 +16,27 @@

## 1) Public API

+ **wsasm_prepare_context(CU_data, options)**
+ **wsasm_prepare_context(CU_data, options) -> context**
* It prepare context from firmware (CU_data) plus the default configuration (options), and it builds the context object to be used in the next steps

+ **wsasm_prepare_source(context, asm_source)**
+ **wsasm_prepare_source(context, asm_source) -> context**
* It prepare context with the source code (asm_source) for the next steps

+ **wsasm_src2obj(context)**
+ **wsasm_src2obj(context) -> ret**
* Assembler API function to transform from source to JSON object

+ **wsasm_obj2mem(ret)**
+ **wsasm_obj2mem(ret) -> ret**
* Assembler API to transform from JSON object to main memory content (binary)

+ **wsasm_src2mem(datosCU, asm_source, options)**
+ **wsasm_src2mem(datosCU, asm_source, options) -> ret**
* Assembler API to transform from source to main memory content (binary)
* Equivalent to wsasm_prepare_context + wsasm_prepare_source + wsasm_prepare_options + wsasm_src2obj + wsasm_obj2mem

+ **wsasm_src2src(datosCU, text, options)**
+ **wsasm_src2src(datosCU, text, options) -> ret**
* Assembler API to transform from source to source (following options)
* The current available option(s) is/are:
* options.instruction_comma = true -> add ',' between instructions fields (e.g.: li x0 1 -> li x0, 1)
* options.instruction_comma = true => add ',' between instructions fields (e.g.: li x0 1 -> li x0, 1)
* It returns the source code at ret.src_alt


<a name="asmng-todo"/>
Expand Down Expand Up @@ -123,10 +124,10 @@ sequenceDiagram
* Description:
* Load JSON object into main memory
* Auxiliary functions are:
* wsasm_writememory_if_word ( mp, gen, track_source, track_comments )
* wsasm_writememory_and_accumulate ( mp, gen, valuebin )
* wsasm_writememory_and_accumulate_part ( mp, gen, valuebin, track_source, track_comments )
* wsasm_zeropadding_and_writememory ( mp, gen )
* wsasm_writememory_if_word ( mp, gen, track_source, track_comments )
* wsasm_writememory_and_accumulate ( mp, gen, valuebin )
* wsasm_writememory_and_accumulate_part ( mp, gen, valuebin, track_source_j, track_source, track_comments )
* wsasm_zeropadding_and_writememory ( mp, gen )

```mermaid
sequenceDiagram
Expand Down
11 changes: 0 additions & 11 deletions ws_dist/repo/examples_set/rv32/default.json
Original file line number Diff line number Diff line change
Expand Up @@ -1021,16 +1021,5 @@
"assembly": "s6e1",
"description": "<span data-langkey='example_06_01'>Test example.</span>",
"testing": true
},
{
"id": "R5E2",
"title": "IEEE 754 (32 bits)",
"type": "<span data-langkey='Special'>Special</span>",
"modes": "newbie,intro,rv",
"hardware": "rv",
"microcode": "rv_base",
"assembly": "s6e7",
"description": "<span data-langkey='example_01_01'>Simple example with fetch, arithmetic instructions, and basic .text segment.</span>",
"testing": true
}
]
11 changes: 0 additions & 11 deletions ws_dist/repo/examples_set/rv32/es_rv.json
Original file line number Diff line number Diff line change
Expand Up @@ -86,16 +86,5 @@
"assembly": "s6e1",
"description": "<span data-langkey='example_06_01'>Test example.</span>",
"testing": true
},
{
"id": "R5E2",
"title": "IEEE 754 (32 bits)",
"type": "<span data-langkey='Special'>Special</span>",
"modes": "newbie,intro,rv",
"hardware": "rv",
"microcode": "rv_base",
"assembly": "s6e7",
"description": "<span data-langkey='example_01_01'>Simple example with fetch, arithmetic instructions, and basic .text segment.</span>",
"testing": true
}
]
3 changes: 2 additions & 1 deletion ws_dist/repo/microcode/rv32/rv_min.mc
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
# WepSIM (https://wepsim.github.io/wepsim/)
#

firmware_version=2,
begin
{
fetch: # IR <- MP[PC]
Expand All @@ -14,7 +15,7 @@ begin
}

test {
co=010110,
oc(6:0)=0010110,
nwords=1,
{
(),
Expand Down

0 comments on commit 638cc52

Please sign in to comment.