1
0
mirror of synced 2026-03-04 10:08:31 +00:00

PROM with a second device (not yet in HW), by abusing the tokenizer a bit (OF doesn't behave as OBP2 for siblings)

This commit is contained in:
Romain Dolbeau
2021-01-09 14:02:29 -05:00
parent 007add0015
commit f3ac0898ba
3 changed files with 76 additions and 6 deletions

View File

@@ -34,8 +34,8 @@ architecture arch of Prom is
signal Prom_ROM : rom_type := (
-- copy/paste the ROM content here --
"11110001000010000100100110001110", -- 1
"00000000000000000000000100011001", -- 2
"11110001000010000111011110000110", -- 1
"00000000000000000000000111001100", -- 2
"00010010000100010101001001000100", -- 3
"01001111010011000010110001100011", -- 4
"01110010011110010111000001110100", -- 5
@@ -104,7 +104,51 @@ architecture arch of Prom is
"00100001000010000000011110110111", -- 68
"00001000000001010000100000000000", -- 69
"01110011000010000000011011000010", -- 70
"00000000000000000000000000000000", -- 71
"00010000101000000101000000001010", -- 71
"00000101000010000000011100000001", -- 72
"00100111000000010001111100010010", -- 73
"00001001010100100100010001001111", -- 74
"01001100001011000111010001110010", -- 75
"01101110011001110000001000000001", -- 76
"00000001000000100001000000000000", -- 77
"00000010000000000000000000011110", -- 78
"00000001000000110001000000000000", -- 79
"00000000000000010000000000000001", -- 80
"00010110000100000000000000000000", -- 81
"00000000000001000000000100010001", -- 82
"00010010000100010111001101101100", -- 83
"01100001011101100110010100101101", -- 84
"01100010011101010111001001110011", -- 85
"01110100001011010111001101101001", -- 86
"01111010011001010111001100000001", -- 87
"00010000000100000000000000000000", -- 88
"00000000000001000000000100010001", -- 89
"00010010000010110110001001110101", -- 90
"01110010011100110111010000101101", -- 91
"01110011011010010111101001100101", -- 92
"01110011000000010001000000000001", -- 93
"00000010101101100000111101101101", -- 94
"01111001001011010111001101100010", -- 95
"01110101011100110010110101100001", -- 96
"01100100011001000111001001100101", -- 97
"01110011011100110000100000001000", -- 98
"10111010000000010000001110110110", -- 99
"00001101011011010111100100101101", -- 100
"01110011011000100111010101110011", -- 101
"00101101011100110111000001100001", -- 102
"01100011011001010000100000001001", -- 103
"10111010101101100000011001101101", -- 104
"01100001011100000010110101101001", -- 105
"01101110000010000000101010110111", -- 106
"00010010000001100110110101100001", -- 107
"01110000001011010110100101101110", -- 108
"00000010000010011100001010110110", -- 109
"00000111011011010110000101110000", -- 110
"00101101011011110111010101110100", -- 111
"00001000000010111011011100010010", -- 112
"00000111011011010110000101110000", -- 113
"00101101011011110111010101110100", -- 114
"00000010000010011100001000000000", -- 115
-- ROM then filled with zero
others => (others => '0'));
begin

View File

@@ -1,8 +1,11 @@
!#/bin/bash
#!/bin/bash
rm -f prom.fc
toke prom.forth
rm -f /tmp/prom.hexa
od --endian=big -w4 -x prom.fc | awk '{ print $2,$3"," }' >| /tmp/prom.hexa
cat /tmp/prom.hexa | sed -e 's/0/0000/g' -e 's/1/0001/g' -e 's/f/1111/g' -e 's/e/1110/g' -e 's/d/1101/g' -e 's/c/1100/g' -e 's/b/1011/g' -e 's/a/1010/g' -e 's/9/1001/g' -e 's/8/1000/g' -e 's/7/0111/g' -e 's/6/0110/g' -e 's/5/0101/g' -e 's/4/0100/g' -e 's/3/0011/g' -e 's/2/0010/g' -e 's/ //g' -e 's/\(.*\),/"\1",/g' | grep -n . | awk -F: '{ print $2" -- "$1 }'
cat /tmp/prom.hexa | sed -e 's/0/0000/g' -e 's/1/0001/g' -e 's/f/1111/g' -e 's/e/1110/g' -e 's/d/1101/g' -e 's/c/1100/g' -e 's/b/1011/g' -e 's/a/1010/g' -e 's/9/1001/g' -e 's/8/1000/g' -e 's/7/0111/g' -e 's/6/0110/g' -e 's/5/0101/g' -e 's/4/0100/g' -e 's/3/0011/g' -e 's/2/0010/g' -e 's/ //g' -e 's/\(.*\),/"\1",/g' | grep -n . | awk -F: '{ print $2" -- "$1 }'

View File

@@ -26,4 +26,27 @@ my-space constant my-sbus-space
map-out-led
;
h# a0500a05 blink!
\ OpenBIOS tokenizer won't accept finish-device without new-device
\ Cheat by using the tokenizer so we can do OpenBoot 2.x siblings
tokenizer[ 01 emit-byte 27 emit-byte 01 emit-byte 1f emit-byte ]tokenizer
\ Absolute minimal stuff; name & registers def.
" RDOL,trng" name
my-address h# 20000 + my-space h# 100 reg
\ we don't support ET or anything non-32bits
h# 04 xdrint " slave-burst-sizes" attribute
h# 04 xdrint " burst-sizes" attribute
headers
my-address constant my-sbus-address
my-space constant my-sbus-space
: map-in ( adr space size -- virt ) " map-in" $call-parent ;
: map-out ( virt size -- ) " map-out" $call-parent ;
\ external
end0