completed README.md
This commit is contained in:
BIN
gallery/example1.pdf
Normal file
BIN
gallery/example1.pdf
Normal file
Binary file not shown.
BIN
gallery/example1.png
Normal file
BIN
gallery/example1.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 378 KiB |
6
gallery/example1.typ
Normal file
6
gallery/example1.typ
Normal file
@ -0,0 +1,6 @@
|
||||
#import "../src/lib.typ": schema, config
|
||||
|
||||
#let example = schema.load("/gallery/example1.yaml")
|
||||
#schema.render(example, config: config.config(
|
||||
full-page: true
|
||||
))
|
73
gallery/example1.yaml
Normal file
73
gallery/example1.yaml
Normal file
@ -0,0 +1,73 @@
|
||||
structures:
|
||||
main:
|
||||
bits: 32
|
||||
ranges:
|
||||
31-28:
|
||||
name: cond
|
||||
27:
|
||||
name: 0
|
||||
26:
|
||||
name: 1
|
||||
25:
|
||||
name: I
|
||||
24:
|
||||
name: P
|
||||
description: pre / post indexing bit
|
||||
values:
|
||||
0: post, add offset after transfer
|
||||
1: pre, add offset before transfer
|
||||
23:
|
||||
name: U
|
||||
description: up / down bit
|
||||
values:
|
||||
0: down, subtract offset from base
|
||||
1: up, addition offset to base
|
||||
22:
|
||||
name: B
|
||||
description: byte / word bit
|
||||
values:
|
||||
0: transfer word quantity
|
||||
1: transfer byte quantity
|
||||
21:
|
||||
name: W
|
||||
description: write-back bit
|
||||
values:
|
||||
0: no write-back
|
||||
1: write address into base
|
||||
20:
|
||||
name: L
|
||||
description: load / store bit
|
||||
values:
|
||||
0: store to memory
|
||||
1: load from memory
|
||||
19-16:
|
||||
name: Rn
|
||||
description: base register
|
||||
15-12:
|
||||
name: Rd
|
||||
description: source / destination register
|
||||
11-0:
|
||||
name: offset
|
||||
depends-on: 25
|
||||
values:
|
||||
0:
|
||||
description: offset is an immediate value
|
||||
structure: immediateOffset
|
||||
1:
|
||||
description: offset is a register
|
||||
structure: registerOffset
|
||||
immediateOffset:
|
||||
bits: 12
|
||||
ranges:
|
||||
11-0:
|
||||
name: 12-bit immediate offset
|
||||
description: unsigned number
|
||||
registerOffset:
|
||||
bits: 12
|
||||
ranges:
|
||||
11-4:
|
||||
name: shift
|
||||
description: shift applied to Rm
|
||||
3-0:
|
||||
name: Rm
|
||||
description: offset register
|
BIN
gallery/example2.pdf
Normal file
BIN
gallery/example2.pdf
Normal file
Binary file not shown.
BIN
gallery/example2.png
Normal file
BIN
gallery/example2.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 303 KiB |
7
gallery/example2.typ
Normal file
7
gallery/example2.typ
Normal file
@ -0,0 +1,7 @@
|
||||
#import "../src/lib.typ": schema, config
|
||||
|
||||
#let example = schema.load("/gallery/example2.yaml")
|
||||
#schema.render(example, config: config.blueprint(
|
||||
full-page: true,
|
||||
left-labels: true
|
||||
))
|
78
gallery/example2.yaml
Normal file
78
gallery/example2.yaml
Normal file
@ -0,0 +1,78 @@
|
||||
structures:
|
||||
main:
|
||||
bits: 32
|
||||
ranges:
|
||||
31-20:
|
||||
name: src
|
||||
depends-on: 5
|
||||
values:
|
||||
0:
|
||||
description:
|
||||
structure: srcImmediate
|
||||
1:
|
||||
description:
|
||||
structure: srcRegister
|
||||
19-15:
|
||||
name: rs1
|
||||
14-12:
|
||||
name: funct3
|
||||
description: function modifier
|
||||
values:
|
||||
000: byte
|
||||
001: half-word
|
||||
"010": word
|
||||
100: upper byte (load only)
|
||||
101: upper half (load only)
|
||||
11-7:
|
||||
name: dst
|
||||
depends-on: 5
|
||||
values:
|
||||
0:
|
||||
description:
|
||||
structure: dstRegister
|
||||
1:
|
||||
description:
|
||||
structure: dstImmediate
|
||||
6:
|
||||
name: 0
|
||||
5:
|
||||
name: I
|
||||
4:
|
||||
name: 0
|
||||
3:
|
||||
name: 0
|
||||
2:
|
||||
name: 0
|
||||
1:
|
||||
name: 1
|
||||
0:
|
||||
name: 1
|
||||
|
||||
srcImmediate:
|
||||
bits: 12
|
||||
ranges:
|
||||
11-0:
|
||||
name: src
|
||||
description: source memory address
|
||||
srcRegister:
|
||||
bits: 12
|
||||
ranges:
|
||||
11-5:
|
||||
name: dstU
|
||||
description: destination address upper bits
|
||||
4-0:
|
||||
name: rs2
|
||||
description: source register
|
||||
|
||||
dstImmediate:
|
||||
bits: 5
|
||||
ranges:
|
||||
4-0:
|
||||
name: destL
|
||||
description: destination address lower bits
|
||||
dstRegister:
|
||||
bits: 5
|
||||
ranges:
|
||||
4-0:
|
||||
name: rd
|
||||
description: destination register
|
Binary file not shown.
Reference in New Issue
Block a user