00:04
cyrozap has quit [Quit: Client quit]
00:08
pie_ has quit [Ping timeout: 268 seconds]
00:15
kuldeep has quit [Ping timeout: 252 seconds]
00:17
cyrozap has joined ##openfpga
00:20
kuldeep has joined ##openfpga
00:34
azonenberg_work has joined ##openfpga
01:12
prpplague has quit [Remote host closed the connection]
01:12
azonenberg_work has quit [Ping timeout: 272 seconds]
01:21
wbraun has joined ##openfpga
02:15
unixb0y has quit [Ping timeout: 268 seconds]
02:15
unixb0y has joined ##openfpga
02:52
emeb has left ##openfpga [##openfpga]
03:13
Miyu has quit [Ping timeout: 252 seconds]
03:46
Bicyclidine has quit [Quit: Lost terminal]
03:50
rohitksingh_work has joined ##openfpga
04:03
kuldeep has quit [Read error: Connection reset by peer]
04:04
kuldeep has joined ##openfpga
04:23
jevinski_ has joined ##openfpga
04:26
jevinskie has quit [Ping timeout: 260 seconds]
04:33
azonenberg_work has joined ##openfpga
04:59
jevinskie has joined ##openfpga
05:00
jevinski_ has quit [Ping timeout: 268 seconds]
05:06
soylentyellow has quit [Ping timeout: 272 seconds]
05:20
soylentyellow has joined ##openfpga
05:56
_whitelogger has joined ##openfpga
06:50
kuldeep has quit [Ping timeout: 244 seconds]
06:50
s_frit has quit [Read error: Connection reset by peer]
06:50
kuldeep has joined ##openfpga
06:51
s_frit has joined ##openfpga
07:01
lovepon has joined ##openfpga
07:51
m4ssi has joined ##openfpga
08:06
lovepon has quit [Ping timeout: 250 seconds]
08:13
GuzTech has joined ##openfpga
08:20
GuzTech has quit [Quit: Leaving]
09:10
Miyu has joined ##openfpga
09:15
Miyu has quit [Ping timeout: 252 seconds]
09:39
rohitksingh_work has quit [Read error: Connection reset by peer]
10:29
s_frit has quit [Remote host closed the connection]
10:29
s_frit has joined ##openfpga
10:32
Maylay has quit [Quit: Pipe Terminated]
10:41
Maylay has joined ##openfpga
11:03
Bike_ has joined ##openfpga
11:03
Bike_ is now known as Bicyclidine
12:10
rohitksingh_work has joined ##openfpga
12:22
<
openfpga-github >
Glasgow/master 42511ec whitequark: gateware.fx2: add missing import.
12:25
<
travis-ci >
whitequark/Glasgow#133 (master - 42511ec : whitequark): The build has errored.
12:39
rohitksingh_work has quit [Read error: Connection reset by peer]
12:48
Miyu has joined ##openfpga
13:27
rohitksingh has joined ##openfpga
13:42
Moiman has joined ##openfpga
14:40
kuldeep has quit [Read error: Connection reset by peer]
14:41
kuldeep has joined ##openfpga
14:53
cr1901_modern has quit [Ping timeout: 252 seconds]
15:35
emeb has joined ##openfpga
16:57
m4ssi has quit [Remote host closed the connection]
17:44
<
whitequark >
azonenberg_work: i found an xc9572 based device
17:44
<
whitequark >
(post card)
17:44
<
whitequark >
can i read out the bitstream?
17:44
<
whitequark >
it has jtag broken out it seems..
17:45
<
whitequark >
lemme see if glasgow picks it up
17:47
rohitksingh has quit [Ping timeout: 244 seconds]
17:59
<
balrog >
whitequark: is security enabled?
17:59
<
balrog >
if not you should be able to read it out
18:07
wbraun has quit [Quit: wbraun]
18:13
<
whitequark >
balrog: no idea
18:13
<
whitequark >
how do i tell
18:15
wbraun has joined ##openfpga
18:20
rohitksingh has joined ##openfpga
18:25
pie_ has joined ##openfpga
18:27
<
azonenberg_work >
whitequark: there's no documentation for how this works
18:27
<
azonenberg_work >
you need a xilinx programmer, an unlocked chip, and some time to RE it
18:27
<
azonenberg_work >
afaik
18:27
<
azonenberg_work >
the coolrunner programming spec is doucmented but i dont think xc95* is
18:31
rk[ghost] has joined ##openfpga
18:36
<
whitequark >
azonenberg_work: ok so
18:37
<
whitequark >
00/01/10 is probably EXTEST/SAMPLE/PRELOAD
18:37
<
whitequark >
11111110 is IDCODE
18:37
<
whitequark >
11111101 has ASCII "ICP" inside
18:37
<
whitequark >
er, ICP
18:37
<
whitequark >
errrr, _ICP
18:39
<
azonenberg_work >
if the idcode ends in 0x093 it's a xilinx idcode
18:39
<
azonenberg_work >
the BSDL is available, so you know what the instructions are
18:39
<
azonenberg_work >
just not what they do
18:40
<
azonenberg_work >
sec
18:40
<
azonenberg_work >
whitequark: this is a vanilla 72? not the 72xl?
18:41
<
whitequark >
hm let's see
18:42
<
azonenberg_work >
ok those are a different process and might have insn hcanges
18:42
* azonenberg_work
loads correct bsdl
18:43
<
azonenberg_work >
idcode is correct
18:43
<
azonenberg_work >
1....01 is USERCODE
18:43
<
azonenberg_work >
EXTEST is 00..0, SAMPLE is 000..01
18:43
<
whitequark >
link to bsdl?
18:43
<
azonenberg_work >
INTEST is 00...10 (SAMPLE and PRELOAD are normally same instruction but read vs write)
18:44
<
azonenberg_work >
$XILINX/ISE_DS/ISE/xc9500xl/data/xc9572xl.bsd
18:44
<
azonenberg_work >
if you have an ise install handy
18:44
<
whitequark >
no ise
18:44
<
whitequark >
only vivado
18:44
<
whitequark >
oh WTF
18:44
<
whitequark >
that just links to vivado
18:45
<
azonenberg_work >
is what you want
18:46
<
azonenberg_work >
anyway, likely interesting instructions... entering and exiting ISP mode (not sure what ENC is)
18:46
<
azonenberg_work >
"ISPEN ( 11101000)," &
18:46
<
azonenberg_work >
"ISPENC ( 11101001)," &
18:46
<
azonenberg_work >
"ISPEX ( 11110000)," &
18:46
<
azonenberg_work >
(those are command insns that likely only have a 1-bit DR that's treated as bypass)
18:47
<
azonenberg_work >
"FBLANK ( 11100101),"&
18:47
<
azonenberg_work >
"FBULK ( 11101101),"&
18:47
<
azonenberg_work >
"FPGMI ( 11101011)," &
18:47
<
azonenberg_work >
"FPGM ( 11101010)," &
18:47
<
azonenberg_work >
"FERASE ( 11101100),"&
18:47
<
azonenberg_work >
"FVFY ( 11101110)," &
18:47
<
azonenberg_work >
"FVFYI ( 11101111)," &
18:47
<
azonenberg_work >
look program related
18:47
<
whitequark >
I: glasgow.applet.jtag: IR=11101000 DR[6]
18:47
<
whitequark >
6-bit DR
18:47
<
azonenberg_work >
huh interesting
18:47
<
azonenberg_work >
maybe its status out?
18:47
<
azonenberg_work >
with coolrunner the enable insn dr isnt even used
18:47
<
azonenberg_work >
you load the ir then go on to another insn
18:47
<
whitequark >
ISPEX is 1-bit
18:48
<
azonenberg_work >
(i havent tried reading/writing the dr though)
18:48
<
azonenberg_work >
note, if they're anything like coolrunner there are timing requirements for programming
18:48
<
azonenberg_work >
you have to add minimum time intervals between some instructions
18:50
<
azonenberg_work >
(also i hope you didn't wipe the chip poking at jtag registers by loading FERASE after ISPEN lol)
18:50
<
whitequark >
wow bsdl is verbose af
18:51
<
azonenberg_work >
whitequark: it's a strict subset of VHDL
18:51
<
whitequark >
and... most of it... is in strings anyway?
18:51
<
azonenberg_work >
duh
18:51
<
whitequark >
what an idiotic format
18:51
<
azonenberg_work >
you see why i dont support it in jtaghal yet/ever? :p
18:51
<
whitequark >
what is the fucking point of having a strongly typed lang if you're gonna embed everything in strings
18:51
<
whitequark >
yeah fuck this shit
18:51
<
whitequark >
someone else can write a converter from bsdl to "something sane"
18:51
<
whitequark >
attribute REGISTER_ACCESS of xc9572xl_tq100 : entity is
18:51
<
whitequark >
"BYPASS ( ISPEX, HIGHZ, CLAMP )," &
18:51
<
whitequark >
"ISPENABLE[6] ( ISPEN, ISPENC )," &
18:51
<
whitequark >
"ISADDRESS[18] ( FERASE, FBULK, FBLANK ),"&
18:51
<
whitequark >
"ISDATA[34] ( FPGMI, FVFYI ),"&
18:52
<
whitequark >
"ISCONFIGURATION[50] ( FPGM, FVFY )";
18:52
<
whitequark >
this makes sense it looks
18:52
<
azonenberg_work >
state values where a given insn is legal?
18:52
<
whitequark >
REGISTER_ACCESS?
18:52
<
azonenberg_work >
yeah
18:53
<
azonenberg_work >
i've only used bsdl to read insn values
18:53
<
azonenberg_work >
and idcodes
18:53
<
whitequark >
i assume this says which
*actual* register it accesses
18:53
<
whitequark >
so both FPGMI and FVFYI have same "format"
18:53
<
azonenberg_work >
oh, i see
18:53
<
azonenberg_work >
thats not bit 34
18:53
<
azonenberg_work >
that's a single 34 bit register
18:53
<
whitequark >
thats lengths
18:53
<
whitequark >
FVFYI is "verify with internally generated address"
18:53
<
whitequark >
so probably something like a counter?
18:53
<
whitequark >
let me try reading from it
18:54
<
rqou >
i don't understand anything about bsdl
18:54
<
whitequark >
rqou: you had a VHDL parser right
18:54
<
rqou >
not complete enough to be used yet
18:54
<
whitequark >
can you make that eat BSDL and shit out something sane
18:54
<
azonenberg_work >
rqou: bsdl is a strict subset of vhdl
18:54
<
whitequark >
i.e. not VHDL
18:54
<
whitequark >
literally anything other than VHDL
18:54
<
whitequark >
COBOL-style fixed width fields are better
18:55
<
rqou >
also yeah, the older cpld jtag algorithms are completely undocumented
18:55
<
rqou >
you need to RE it
18:55
<
whitequark >
well it doesnt look like its
18:55
<
whitequark >
complicated
18:55
<
whitequark >
at all
18:56
<
whitequark >
lemme just fuck around with it
18:56
<
rqou >
there's a "programmer qualification document" like for xc2c, but it documents a completely separate HVPP algorithm
18:56
<
whitequark >
i have two of these boards anyway lol
18:56
<
whitequark >
what, do you expect me to actually read docs
18:56
<
whitequark >
docs are for the weak
18:56
<
whitequark >
chad whitequark vs virgin rqou
18:57
<
rqou >
idk about these parts, but fyi on xc2c if you mess up the done/secure bits enough the chip gets kinda confused
18:57
<
whitequark >
well the chip can go fuck itself
18:58
<
whitequark >
thats not my problem
18:58
<
rqou >
at least on those you can recover by issuing chip erase commands and power cycling
18:58
<
whitequark >
who said i am going to write it?
18:58
<
whitequark >
i just wanna read the bitcode
18:58
<
azonenberg_work >
also fwiw, on coolrunner there is additoinal nvram for things like the jtag idcode
18:58
<
whitequark >
bit... stream
18:58
<
whitequark >
wait what
18:58
<
whitequark >
you can
18:58
<
whitequark >
modify idcode?
18:58
<
rqou >
we don't know how
18:58
<
azonenberg_work >
i dont know about MODIFY
18:58
<
whitequark >
that seems ideal for counterfeiting lol
18:58
<
azonenberg_work >
But what we know is, the idcode is package dependent
18:58
<
whitequark >
isn't it efuses or something
18:58
<
azonenberg_work >
its the only xilinx part where the idcode changes by package
18:59
<
azonenberg_work >
we dont know, however the bsdl hints that its extra flash rows
18:59
<
azonenberg_work >
because theres the normal erase instruction and an "erase all" instruction
18:59
<
azonenberg_work >
Which implies there is more to erase than the bitstream
18:59
<
azonenberg_work >
i havent tried using it since its a probable device brick and i dont have soldering gear set up to repair a bricked board right now
19:00
<
rqou >
if you're brave you can try the HV parallel programming algorithm on the xc9500s
19:00
<
whitequark >
that needs ... more pins
19:00
<
whitequark >
and soldering
19:00
<
whitequark >
and im lazy
19:00
<
azonenberg_work >
for the FPGA devices, efuse is likely used for idcode (or some bits thereof)
19:00
<
azonenberg_work >
because they already are known to have on die efuse, and not flash
19:00
<
azonenberg_work >
coolrunner doesnt have any known efuse
19:00
<
azonenberg_work >
more importantly it has known on die NVM
19:00
<
azonenberg_work >
(which is 2T EEPROM, not flash!)
19:02
<
rqou >
anyways, we don't yet have the ability to decompile xc9500/xc9500xl bitstreams yet
19:02
<
rqou >
the hard part is the internal interconnect
19:03
<
whitequark >
can't ise do it?
19:04
<
rqou >
anyways, I'm about to finally actually start driving down to LA, see you later
19:04
rohitksingh has quit [Ping timeout: 260 seconds]
19:04
<
rqou >
no, you can't decompile
19:06
<
rqou >
interestingly lattice can decompile some altera cpld bitstreams
19:08
<
rqou >
lattice has some parts that are a microarchitectural superset of altera parts
19:08
<
rqou >
including interconnect
19:14
<
whitequark >
azonenberg_work: ok, reading FVFYI
19:14
<
whitequark >
D: glasgow.applet.jtag: JTAG: shift tdo=<0011111111111111111111111111111111>
19:14
<
whitequark >
just this
19:15
<
whitequark >
looks like 2 bits "control" and 32 bits "data" ?
19:15
<
azonenberg_work >
might be 2 bits padding/address lsb
19:15
<
whitequark >
if I do IR_ISPEN first
19:15
<
azonenberg_work >
but the 2/32 split seems plausible so far
19:15
<
whitequark >
D: glasgow.applet.jtag: JTAG: shift tdo=<1000000000000000000000000000000000>
19:15
<
whitequark >
and indeed
19:16
<
whitequark >
I am reading some kinda data
19:16
<
whitequark >
mostly zeroes
19:16
<
whitequark >
but occasionaly some bits
19:16
<
azonenberg_work >
whitequark: and no xilinx tools do any kind of bitstream decompile
19:16
rohitksingh has joined ##openfpga
19:16
<
azonenberg_work >
none of the public tools support this, by design
19:16
<
azonenberg_work >
they want bitstreams to be write only
19:16
<
azonenberg_work >
NCD etc can be read back and poked at but NCD-BIT is a one way trip
19:16
<
whitequark >
azonenberg_work: how long is the xc9572xl bitstream
19:16
<
whitequark >
whats NCD?
19:16
<
daveshah >
NCD is the neocad post-place-and-route database
19:16
<
azonenberg_work >
NCD is the ISE FPGA (diff file format for CPLDs) par db
19:16
<
daveshah >
that ISE and Lattice Diamond both use
19:17
<
azonenberg_work >
whitequark: a few kB i think? let me generate one and test
19:17
<
daveshah >
Both Lattice (NCL) and Xilinx (XDL) have text representations and tools to convert to/from those
19:18
<
azonenberg_work >
yeah
19:18
<
azonenberg_work >
NCD is something you don't ship
19:18
<
azonenberg_work >
once you go to bit, you're flashing a device and they intentionally do not want you to be able to bit -> ncd
19:19
<
azonenberg_work >
i'm almost certain that for debugging xilinx has an internal bit-ncd converter
19:19
<
azonenberg_work >
But its not released
19:19
<
daveshah >
Lattice ship part of one with Diamond
19:19
<
daveshah >
It can do bitstream to name of bits
19:19
<
daveshah >
but not actually to any kind of netlist
19:19
<
azonenberg_work >
oh interesting
19:19
<
azonenberg_work >
whitequark: 46656 bits
19:19
cr1901_modern has joined ##openfpga
19:20
<
whitequark >
let's see
19:20
<
azonenberg_work >
or 1458 32-bit words. if that's how the config mem is structured
19:20
<
whitequark >
it's def 32-bit words
19:21
<
azonenberg_work >
interesting, coolrunner uses array-sized memory
19:21
<
azonenberg_work >
i.e. 48 rows of 260 bits
19:21
<
azonenberg_work >
with explicit x/y addressing
19:21
<
azonenberg_work >
(for the 32a)
19:21
<
azonenberg_work >
this sounds like closer to an fpga-style config architecture
19:22
<
azonenberg_work >
where you push words out to some kind of decoder that later go to the actual registers
19:29
<
whitequark >
azonenberg_work: USERCODE is in the bitstream right?
19:30
<
azonenberg_work >
Yes, it should be
19:30
<
whitequark >
ok, it is not laid out directly ten
19:30
<
azonenberg_work >
its sole purpose is to be a bitstream programmed 32-bit value
19:30
<
whitequark >
looking further
19:30
<
whitequark >
1267 valid=1 unknown=0 data=00000000000000000000000000011111
19:31
<
whitequark >
1429 valid=1 unknown=0 data=00000000000000000000000000011111
19:31
<
whitequark >
context
19:31
xdeller has quit [Remote host closed the connection]
19:31
<
whitequark >
at read N=1267 there is an unique word 00000000000000000000000000011111
19:31
<
whitequark >
at read N=1458+1429 there is the same unique word 00000000000000000000000000011111
19:31
<
azonenberg_work >
if this helps, this is the generated bitstream for a mostly-blank device (assign b = a)
19:31
<
whitequark >
so, it definitely loops over
19:32
<
azonenberg_work >
the block boundaries may be insightful
19:32
<
azonenberg_work >
i assume they mean someting
19:32
<
azonenberg_work >
but theres no comments a la coolrunner
19:32
<
whitequark >
after... 0x654 words?
19:34
<
whitequark >
in other words
19:34
<
whitequark >
the period of FVFYI is 1620
19:34
<
whitequark >
let me verify
19:35
<
azonenberg_work >
usercode 00000000 vs 55555555
19:35
<
azonenberg_work >
if that tells you anything
19:35
<
azonenberg_work >
mind you this is jed fuse numbers and idk how they map to programming algorithm info
19:35
<
azonenberg_work >
(i havent made a svf to test)
19:36
pie_ has quit [Ping timeout: 272 seconds]
19:36
<
whitequark >
let's see
19:42
<
whitequark >
azonenberg_work: interesting
19:42
<
whitequark >
looks like the first 13 (?) words read from FVFYI
19:42
<
whitequark >
are some kinda prefix
19:42
<
whitequark >
it only starts repeating after that
19:43
<
azonenberg_work >
maybe thats some special header with config info or something
19:43
<
azonenberg_work >
and not stored in the main config memory?
19:43
<
whitequark >
firsttwo words are
19:43
<
whitequark >
-valid=1 unknown=0 data=11001001110010011100100111001001
19:43
<
whitequark >
-valid=1 unknown=0 data=01001010010010100000000101001010
19:43
<
whitequark >
which seems like some kinda info indeed
19:44
<
whitequark >
>>> bitarray("11001001110010011100100111001001", endian="little").tobytes()
19:44
<
whitequark >
b'\x93\x93\x93\x93'
19:44
<
whitequark >
>>> bitarray("01001010010010100000000101001010", endian="little").tobytes()
19:44
<
whitequark >
b'RR\x80R'
19:46
<
whitequark >
azonenberg_work: actually,it is weirder
19:48
<
whitequark >
the first 20 words are totally different between 0th read and 1th read
19:48
<
whitequark >
and identical afterwards
19:48
<
whitequark >
on 0th read this is "two special words plus zeroes"
19:49
<
whitequark >
on 1th read this is some weird sorta junk
19:49
<
whitequark >
azonenberg_work: what is the JED format?
19:49
<
whitequark >
how is it structured?
19:50
<
whitequark >
it looks like goddamn gcode
19:50
<
whitequark >
is PPMAP some kinda bit permutation?
19:52
<
whitequark >
bond pad to pin map right?
19:54
<
azonenberg_work >
whitequark: there's a file format spec on the jedec website
19:54
<
azonenberg_work >
i think you have to register but its free
19:55
<
azonenberg_work >
whitequark: is it possible that you have a repeating structure in the bitstream and are just not reading to the end?
19:56
<
whitequark >
azonenberg_work:
19:56
<
whitequark >
i've read 6000 words
19:56
<
whitequark >
and i found more than 2 repeats
19:56
<
whitequark >
i am very sure the period is 1620
19:56
<
whitequark >
yeah, fouond it
19:56
<
azonenberg_work >
its meant to be streamed in real time from a pc to a rs232-attached parallel pld programmer
19:57
<
azonenberg_work >
if that helps you understand context
19:57
<
azonenberg_work >
so they have stx/etx codes, ascii bit values
19:57
<
azonenberg_work >
etc
19:57
<
whitequark >
does this cpld have an onboard clock generator?
19:57
<
azonenberg_work >
not user accessible but they may self-time flash operations
19:58
<
azonenberg_work >
the coolrunner at least has to have a clock source for the boot process since its flash->sram
19:58
<
azonenberg_work >
i believe, but have not confirmed, that 9500 has floating gate cells directly in the config logic
19:58
<
azonenberg_work >
i.e. there is no config sram
19:59
<
azonenberg_work >
whitequark: also, another thing to keep in mind is that coolrunner violates the spirit of the jed file format and requires an address mapping between jed addresses and actual bitstream bits
19:59
<
whitequark >
oh so it's only flash programmable
19:59
<
azonenberg_work >
i.e. they are 1:1 but it is not a linear address space
19:59
<
azonenberg_work >
i do not know if 9500 is the same
19:59
<
whitequark >
let's see
19:59
<
azonenberg_work >
9500 was a xilinx in house design and coolrunner was acquired from philips
19:59
<
whitequark >
i'm a bit confused about your diff
20:00
<
whitequark >
19:35 < azonenberg_work> usercode 00000000 vs 55555555
20:00
<
azonenberg_work >
whitequark: that is two identical bitstreams with usercode of 0x55555555 and (unspecified) which is probably 0x00000000
20:00
<
whitequark >
it is not 0x0000000
20:00
<
whitequark >
it is probably ummm
20:00
<
azonenberg_work >
this is 55555555 vs 41414141
20:01
<
azonenberg_work >
the reason i have these values is because the cpld usercode is specified as 4 ascii character on the command line, not hex
20:01
<
whitequark >
yes, this makes MUCH more sense
20:01
<
azonenberg_work >
like it is in fpgas
20:01
<
whitequark >
can you do a diff between 00000000 (explicit) and 5555AAAA (also explicit)
20:01
<
whitequark >
this should give me all info
20:01
<
azonenberg_work >
i cannot do 00000000
20:01
<
azonenberg_work >
it wants me to type the usercode in as 4 chars in a text box
20:01
<
whitequark >
ok, 11111111 then
20:02
<
whitequark >
what the fuck
20:02
<
azonenberg_work >
i can do 30303030
20:02
<
azonenberg_work >
which is "0000"
20:02
<
whitequark >
ok, 30303030 vs 55555555
20:02
<
whitequark >
seems good
20:02
<
whitequark >
since all bit pairs differ
20:02
<
whitequark >
which is what i need to locate
20:03
<
whitequark >
sweet, let me see
20:04
<
azonenberg_work >
whitequark: btw can you write up what you learn from doing this and stick it somewhere?
20:04
<
whitequark >
yes, 32 lines
20:04
<
whitequark >
it will be in glasgow source code
20:04
<
azonenberg_work >
why there?
20:04
<
azonenberg_work >
i was thinking another dir under here
20:04
<
azonenberg_work >
keep it in one place
20:04
<
azonenberg_work >
this is where the coolrunner bitstream spec lives
20:04
<
whitequark >
because this is the canonical location for glasgow engineering documents
20:04
<
whitequark >
is an enormous document about ibm floppy drives, for some reason
20:05
<
whitequark >
i dont even remember why i figured out how they work anymore
20:05
<
whitequark >
but it was a pain
20:05
<
whitequark >
shitty 1b2b encoding
20:05
<
whitequark >
that no one even describes as 1b2b
20:05
<
whitequark >
instead they say it is "modified FM"
20:05
<
azonenberg_work >
lol
20:05
<
azonenberg_work >
you see why i dont do legacy stuff?
20:06
<
whitequark >
eh its ok
20:06
<
whitequark >
once you slog through the horrible docs
20:06
<
azonenberg_work >
i work with modern protocols and devices where things are cursed in... different ways :p
20:06
<
whitequark >
actually i think i would have done it faster if i have never read any of the docs at all
20:06
<
azonenberg_work >
lolol
20:06
<
whitequark >
because half of the info there is just misleading
20:06
<
whitequark >
and the other half is plain out incorrect
20:06
<
whitequark >
and the old devices that implement it as specced do things wrong
20:06
pie_ has joined ##openfpga
20:06
<
azonenberg_work >
whitequark: in that case we should make a wiki page somewhere
20:06
<
azonenberg_work >
i want there to be some document, somewhere
20:06
<
whitequark >
e.g. the K.C2 MFM comma, you cannot sync on it
20:06
<
azonenberg_work >
that contains pointers to all known fpga/pld bitstream documentation
20:07
<
whitequark >
because it can be found in data shifted by 90°
20:07
<
whitequark >
you can only sync on K.C2 K.C2
20:07
<
whitequark >
but
*no one has ever wrote this anywhere*
20:07
<
azonenberg_work >
where the docs live, i dont know or care
20:07
<
whitequark >
and indeed the ibm floppy dontroller has a bug where it syncs on K.C2
20:07
<
azonenberg_work >
but i want an index somewhere
20:07
<
whitequark >
and loses sync
20:07
<
whitequark >
in the middle of a track
20:07
<
azonenberg_work >
lolol
20:07
<
whitequark >
re wiki page: sure
20:11
<
whitequark >
i wonder how is the memory organized block wise
20:11
<
whitequark >
azonenberg_work: did you mention blocks?
20:11
<
azonenberg_work >
(you are gonna have to get a copy of ise to poke at this i think)
20:11
pie_ has quit [Ping timeout: 268 seconds]
20:11
<
whitequark >
ehhh I don't have disk space for ise right now
20:11
<
whitequark >
annoyingly so
20:12
<
whitequark >
it's a 512G SSD
20:12
<
whitequark >
and I need at
*least* 2 TB
20:12
pie_ has joined ##openfpga
20:12
<
azonenberg_work >
if the die structure gives you any hints
20:12
<
whitequark >
oh huh
20:12
<
whitequark >
iiiiinteresting
20:12
<
azonenberg_work >
unfortunately do not have a delayered image at the moment
20:12
<
azonenberg_work >
or facilities to do so
20:12
<
whitequark >
ok that's kind of a low res image
20:13
<
azonenberg_work >
i was thinking block diagram level more so than anything else
20:13
<
azonenberg_work >
but you can see the four function blocks in a 2x2 tile
20:13
<
azonenberg_work >
macrocells at top and bottom of the array, routing in the center
20:13
<
azonenberg_work >
then PLA is the triangular structures
20:13
<
whitequark >
whats up with the metal on right?
20:13
<
whitequark >
it's asymmetric
20:14
<
azonenberg_work >
that is likely where the non-array stuff lives
20:14
<
azonenberg_work >
jtag, boot, etc
20:14
<
azonenberg_work >
but thats purely a conjecture based on limited data
20:14
<
azonenberg_work >
where we know a lot more about the bitstream
20:15
<
azonenberg_work >
note the pla is a much smaller potion of the die because there is separate config eeprom
20:16
<
azonenberg_work >
whoops thats a bad image, let me get you a delayer
20:17
<
azonenberg_work >
here we go
20:17
jevinskie has joined ##openfpga
20:17
<
azonenberg_work >
also note that the coolrunner function blocks are based on pure digital trees of and/or gates
20:17
<
whitequark >
azonenberg_work: hang on
20:17
<
azonenberg_work >
while the xc9500 are sense amplifier based
20:17
<
whitequark >
the JED file still needs a xilinx programmer right?
20:17
<
azonenberg_work >
So they're denser (probably one floating gate pass fet per bit or something?)
20:17
<
whitequark >
that knows how to serialize it via JTAG?
20:18
<
azonenberg_work >
but more power hungry
20:18
<
whitequark >
you said 1458 words because of QF46656
20:18
<
azonenberg_work >
whitequark: in theory, it should be possible to feed a jed directly to/from th echip
20:18
<
azonenberg_work >
coolrunner breaks that
20:18
<
azonenberg_work >
but according to the standard it SHOULD work natively
20:18
<
whitequark >
where is the info that says where you feed from JED to the chip?
20:18
<
whitequark >
which IR/DR?
20:18
<
azonenberg_work >
i dont know if that's documented :)
20:18
<
whitequark >
no I mean
20:18
<
azonenberg_work >
or bit ordering etc
20:18
<
azonenberg_work >
the standard is for moving files to black-box programmers
20:19
<
azonenberg_work >
what the programmer does with it is not specified by jedec
20:19
<
whitequark >
I think I figured something out
20:19
<
whitequark >
can you paste me a full jed file
20:19
<
azonenberg_work >
did i not send you one already?
20:19
<
whitequark >
nvm, you did
20:22
<
whitequark >
so it has 972 4x8-bit lines, and 648 4x6-bit lines
20:22
<
whitequark >
which comes out to...
20:22
<
whitequark >
1620 words.
20:22
<
whitequark >
looks like there are two different memory cell types, but the addressing is uniform
20:23
<
azonenberg_work >
interesting
20:23
<
whitequark >
brb, documenting
20:24
<
whitequark >
oh, even more interesting
20:24
<
whitequark >
it is organized into blocks of 9+6 rows
20:24
<
whitequark >
9 4x8 rows then 6 4x6 rows
20:25
<
whitequark >
seems remarkably uniform
20:25
<
azonenberg_work >
how many of these blocks are there?
20:25
<
azonenberg_work >
if anything is in groups of 4 tiles you've found the function blocks
20:25
<
azonenberg_work >
also, what might help is if somebody made a nontrivial design and generated a SVF file
20:25
<
azonenberg_work >
which has all of the jtag instructions to read/write the chip
20:25
<
azonenberg_work >
and trace bits from there out to the jed
20:25
<
azonenberg_work >
say, make a jed with only one nonzero bit and trace that to the svf
20:25
<
azonenberg_work >
etc
20:26
<
whitequark >
there are exactly 108 of these blocks
20:27
<
azonenberg_work >
so 27 blocks per function block?
20:27
<
whitequark >
looks like so
20:28
pie_ has quit [Remote host closed the connection]
20:28
<
azonenberg_work >
interesting because the fbs have 18 macrocells each
20:28
<
azonenberg_work >
that sounds like a 3:2 relationship
20:28
pie_ has joined ##openfpga
20:29
<
azonenberg_work >
eonjcture: the base unit isnt 27
20:29
<
azonenberg_work >
it's 54
20:29
<
azonenberg_work >
conjecture*
20:29
<
azonenberg_work >
and you have one block for each function block plus one for interconnect
20:29
<
azonenberg_work >
totally hypothetical and i could be way off
20:30
<
whitequark >
azonenberg_work: do you think its safe to program the entire chip into zeroes
20:30
<
whitequark >
and, into ones
20:30
<
whitequark >
just to see which bits are stuck at 0
20:31
<
azonenberg_work >
no
20:31
<
azonenberg_work >
definitely not
20:31
<
azonenberg_work >
if it's anything like coolrunner you'll get internal bus fights up the wazoo
20:31
<
azonenberg_work >
coolrunner is loaded with one-hot muxes
20:31
<
azonenberg_work >
that is in fact exactly how i killed the chip on purpose
20:31
<
azonenberg_work >
i set half the inputs of each mux high and half low
20:31
<
azonenberg_work >
then went N-hot
20:31
<
azonenberg_work >
to get a maximal short
20:32
<
whitequark >
hmmmmm $5 per chip
20:32
<
whitequark >
kind of pricey plus i have to rework
20:32
<
whitequark >
ok let's use the brain instead
20:32
<
whitequark >
i can probably just look at which bits are always 0
20:34
pie_ has quit [Excess Flood]
20:35
pie_ has joined ##openfpga
20:37
<
whitequark >
pfffffff
20:37
<
whitequark >
11000000110000001000000011000000
20:37
<
whitequark >
10000000100000001000000000000000
20:37
<
whitequark >
thanks xilinx
20:37
<
whitequark >
the 6-bit fields are definitely MSB-aligned
20:38
<
whitequark >
00101011000001000001000000000000
20:38
* whitequark
stares
20:38
<
whitequark >
azonenberg_work: i feel like uh
20:38
<
whitequark >
the way they are aligned kinda depends on where they are on the chip
20:39
<
whitequark >
maybe they go left-right
20:39
<
whitequark >
probably not depending on quadrant
20:39
<
azonenberg_work >
they are almost certainly mirrored and rotated
20:39
<
azonenberg_work >
conjecture: left side of the chip in the microscope photo is the top in address space
20:39
<
azonenberg_work >
left and right in address space are mirrored on the die
20:39
<
azonenberg_work >
Whether they're mirrored in the address space i dont know
20:40
<
whitequark >
i think the bitstream does not separate into quadrants
20:40
<
whitequark >
it seems like it goes top-bottom-top-bttom
20:40
<
whitequark >
because of how alignment works out
20:40
<
azonenberg_work >
you may have a logical vs physical bitstream then
20:40
<
azonenberg_work >
similar to how coolrunner is done
20:40
<
azonenberg_work >
where you have to remap before you feed to jtag
20:40
<
azonenberg_work >
or alternatively, the remapping is done in the jtag logic on die
20:40
<
azonenberg_work >
and you feed logical addressing in
20:41
<
whitequark >
ok wtf
20:41
<
whitequark >
11000001110000001010000011000000
20:41
<
whitequark >
this one makes NO sense
20:41
<
whitequark >
did i mess up my indexing?...
20:41
<
whitequark >
ah yes
20:41
<
whitequark >
I cannot count
20:42
<
whitequark >
off-by-1
20:42
<
whitequark >
no, still this weird shit
20:42
<
whitequark >
maybe the other bits are just invalid?..
20:42
<
whitequark >
and the programmer is supposed to ignore them?
20:42
<
whitequark >
e.g. there would be preveious value left on some floating gate
20:42
<
whitequark >
is that possible?
20:44
pie_ has quit [Ping timeout: 245 seconds]
20:45
rohitksingh has quit [Ping timeout: 246 seconds]
20:46
rohitksingh has joined ##openfpga
20:49
kuldeep has quit [Read error: Connection reset by peer]
20:50
kuldeep has joined ##openfpga
20:58
<
whitequark >
azonenberg_work: see XAPP069 btw
20:58
<
whitequark >
ISPEX transfers the XC9500/XL/XV memory cell contents to internal low power configuration
20:58
<
whitequark >
latches.
20:58
<
whitequark >
has some docs on the IRs
20:59
<
azonenberg_work >
oh interesting? so there IS a sram latch memory
20:59
<
whitequark >
it documents all IR values other than ISPENC
20:59
<
whitequark >
no idea what C is
21:00
<
whitequark >
differs by LSB
21:00
<
whitequark >
which elsewhere is "command variant"
21:00
<
whitequark >
so not iformative
21:06
<
azonenberg_work >
whitequark: also they summarize the ir values
21:06
<
azonenberg_work >
but dont include details on what the dr's do
21:06
<
whitequark >
but BSDL gives a lot of insight into that
21:06
<
whitequark >
lemme write up
21:07
<
whitequark >
ok so, FPGM and FVFY have a 50-bit DR, FPGMI and FVFYI have a 34-bit DR
21:08
<
whitequark >
conjecture: first two bits are strobes
21:08
<
whitequark >
bit 1 is likely read strobe, bit 1 might be write strobe or something
21:08
<
whitequark >
let me try and experiment with FVFY to see how the address works
21:08
<
whitequark >
FERASE, FBULK, FBLANK all use 18-bit DR
21:08
<
whitequark >
so, 16-bit address, 32-bit data...
21:08
<
whitequark >
this is very easy to RE lol
21:09
<
azonenberg_work >
lol it wasnt meant to be hard
21:09
<
azonenberg_work >
keep in mind it may not be linear addressing
21:09
<
azonenberg_work >
coolrunner is gray coded
21:09
<
whitequark >
lets try to read address 205
21:09
<
whitequark >
this has a bunch of nonzero stuff around it
21:09
<
whitequark >
so i know how the alignment is
21:10
<
whitequark >
first DR read: 00000000000000000000000000000000001111111111111111
21:10
<
whitequark >
second DR read: 00111111111111111111111111111111111111111111111111
21:11
<
whitequark >
... i did not even have to try and figure out the layout
21:11
<
azonenberg_work >
lol
21:11
<
whitequark >
it literally just shown me
21:11
<
whitequark >
incredible chip
21:11
<
azonenberg_work >
simple, i like it :p
21:11
<
whitequark >
this is literally the least effort i have ever put into reverse-engineering anything
21:11
<
whitequark >
i just... write these things down
21:11
<
whitequark >
thats it
21:11
<
whitequark >
self-documenting hardware lmao
21:12
<
azonenberg_work >
lol
21:12
<
whitequark >
it would have only been easier if they put the ASCII spec in a ROM and shifted it via some infinitely long DR
21:12
<
azonenberg_work >
lool
21:12
<
whitequark >
which is actually something i should do one day
21:12
<
whitequark >
just for shock value
21:14
rohitksingh has quit [Ping timeout: 252 seconds]
21:15
rohitksingh has joined ##openfpga
21:16
<
whitequark >
ok, so setting any high bit
21:17
<
whitequark >
of the 2 control bits
21:17
<
whitequark >
results in reading first 00000010000000000000000000000000001111111111111111
21:17
<
whitequark >
then 00000000000000000000000000000000001111111111111111
21:17
<
whitequark >
this seems... odd.
21:17
<
whitequark >
oh wait
21:17
<
whitequark >
i forgot to enable isp
21:18
<
azonenberg_work >
whitequark: also possible that they have latency
21:19
<
azonenberg_work >
with coolrunner you do one dr scan writing the address and dontcare data
21:19
<
azonenberg_work >
then another with the next address to read and you get data out of the first round
21:19
<
whitequark >
yes, how else would it even work?
21:19
<
azonenberg_work >
then you pipeline from there out
21:19
<
whitequark >
exactly
21:19
<
azonenberg_work >
well the other possibility would be a second instruction or something
21:19
<
whitequark >
there's no other way
21:19
<
azonenberg_work >
load addr register then read data reg
21:19
<
whitequark >
ahhh yeah
21:19
<
azonenberg_work >
but thats less efficient
21:19
<
whitequark >
ok, all writes with LSB/LSB+1 set to 0 are just ignored
21:20
<
whitequark >
all writes with LSB set to 1 seem to return 10000000000000000000000000000000000000000100000000 regardless of other bits
21:20
<
azonenberg_work >
transfer bits or similar? or some kind of status flags?
21:21
<
whitequark >
hmm, maybe not
21:21
<
whitequark >
let's see
21:21
<
whitequark >
ok wtf
21:22
<
whitequark >
what???
21:22
<
whitequark >
i think the BSDL lies lol
21:22
<
whitequark >
ISCONFIGURATION is 39 bit long
21:22
<
whitequark >
not 50
21:23
<
whitequark >
because
21:23
<
whitequark >
i write 10100000000000000000000000000000000000000000000000
21:23
<
whitequark >
and i immediately get 10000000000000000000000000000000000000010100000000 back
21:23
<
whitequark >
like, in the same DR exchange
21:24
* whitequark
stares more
21:24
<
whitequark >
oh ffs
21:24
<
whitequark >
nevermind
21:25
<
whitequark >
writes with LSB high are ignored
21:26
<
whitequark >
writes with any other bits except low two are ignored
21:26
<
whitequark >
writes with 0:1 set to 01 are ignored
21:26
<
whitequark >
actually, which writes aren't ignored?
21:26
<
whitequark >
11 ignored too
21:28
rohitksingh has quit [Ping timeout: 240 seconds]
21:29
rohitksingh has joined ##openfpga
21:29
<
whitequark >
got it to do something
21:29
<
whitequark >
by writing random junk there
21:30
<
whitequark >
looks like it's address then data
21:33
* kc8apf
drools over softiron overdrive 3000
21:40
<
whitequark >
lol what
21:41
<
whitequark >
azonenberg_work: so
21:41
<
whitequark >
it gives me the address i wrote into it
21:41
<
whitequark >
in rverse
21:41
<
whitequark >
for some reason
21:41
<
whitequark >
afaict
21:41
<
whitequark >
and it looks like it actually uses byte addressing?..
21:42
<
sorear >
seems brave to be doing this on a chip w/ data you care about
21:42
<
whitequark >
well i've already read out the entire thing
21:45
<
whitequark >
azonenberg_work: looks like bit 8 is necessary and sufficient to be set for the output to change
21:45
<
whitequark >
interesting
21:46
<
whitequark >
other bits seem to be mostly ignored
21:48
<
whitequark >
azonenberg_work: i wonder if ISCONFIGURATION is not just address + data
21:48
<
whitequark >
but more like COMMAND + DATA
21:48
<
azonenberg_work >
very likely
21:49
<
whitequark >
or not even just command
21:49
<
azonenberg_work >
Gimme a sec to make you a SVF for readback
21:49
<
azonenberg_work >
that may help
21:49
<
whitequark >
i think it's not command exactly
21:49
<
whitequark >
i think it's driving an FSM directly
21:49
<
sorear >
like y'all are not even trying to MITM the official programmer?
21:49
<
azonenberg_work >
do you want a trivial bitstream or something with more bits set?
21:49
<
whitequark >
trivial
21:49
<
azonenberg_work >
sorear: whitequark doesnt have a copy of ise
21:49
<
azonenberg_work >
Lol
21:49
<
whitequark >
sorear: or the original programmer
21:50
<
whitequark >
or patience for this shit
21:50
<
whitequark >
its legit easier to just poke the chip than to dig in xilinx crap
21:50
<
whitequark >
azonenberg_work: i think i found out partof the command set already
21:50
<
whitequark >
gimme a sec
21:50
<
whitequark >
ok, bit 7 sets the VALID bit in output
21:52
<
azonenberg_work >
whitequark: its too big for the debia npastebin lol
21:52
<
whitequark >
i wonder why the fuck does it reverse the bits
21:52
wbraun has quit [Quit: wbraun]
21:53
<
whitequark >
this is very
21:53
<
azonenberg_work >
the original file was these two concatenated
21:53
<
azonenberg_work >
i think i split at the right spot
21:53
<
azonenberg_work >
but dont trust me on that
21:54
<
whitequark >
that seems legit given what ive seen so far
21:54
<
azonenberg_work >
note the 20K tck cycles between program operations
21:55
<
azonenberg_work >
probably waiting for each address to program
21:55
<
whitequark >
SDR 50 TDI (00058400000003) TDO (00058000000001) MASK (03fffcfcfcfcff) ;
21:55
<
sorear >
whitequark: sure, I'm just thinking about "what if there's a bonus undocumented erase command"
21:55
<
whitequark >
sorear: no the ERASE cmmands are all documented
21:56
<
whitequark >
SDR 50 TDI (000d0400000103) TDO (000d0000000001) ;
21:56
<
whitequark >
RUNTEST 1 TCK;
21:56
<
whitequark >
RUNTEST 1 TCK;
21:56
<
whitequark >
SDR 50 TDI (000d0800000003) TDO (000d0400000101) ;
21:56
<
daveshah >
sorear: halt and catch fire style perhaps :D
21:56
<
whitequark >
azonenberg_work: this actually looks like data:address hmmmmmm
21:57
<
azonenberg_work >
looks like addr:data to me
21:57
<
azonenberg_work >
24 bit address then 32 bit data
21:57
<
azonenberg_work >
with addr bytewise
21:58
<
whitequark >
no, the low bits are valid + write strobe
21:58
<
whitequark >
i think
21:58
<
azonenberg_work >
the tdo data is verification of the bitstream for this particular design
21:58
<
whitequark >
so you see address shifted by ... wait, what
21:58
<
azonenberg_work >
the SDR command specifies the tdi data you feed the chip and the expected tdo data
21:59
<
whitequark >
azonenberg_work: no its not 24 + 32 bit
21:59
<
whitequark >
SDR 50
21:59
<
whitequark >
thats why
21:59
<
azonenberg_work >
well ok yeah the high bits are chopped
21:59
<
azonenberg_work >
they padded it i guess
21:59
<
azonenberg_work >
But svf is meant to be executed line by line by a dumb programmer
21:59
<
whitequark >
and 3 is def strobes
21:59
<
azonenberg_work >
probably passed in over rs232
21:59
<
whitequark >
this all makes sense to me
21:59
<
whitequark >
(i should implement SVF lol)
21:59
<
azonenberg_work >
how sure are you that they're strobes? are they not in the jed?
21:59
<
whitequark >
they are not in the JED
21:59
<
whitequark >
for sure
21:59
<
azonenberg_work >
yeah ok
21:59
<
whitequark >
and they look super like strobes elsewhere
22:00
<
azonenberg_work >
then probably valid/strobe bits or something
22:00
<
whitequark >
this is how all its registers look like
22:00
<
azonenberg_work >
i know coolrunner has a "transfer bit" at the start and end of each 260-bit register
22:00
* whitequark
facedesks
22:01
<
whitequark >
i think i'm miscounting again
22:01
azonenberg_mobil has joined ##openfpga
22:01
<
azonenberg_work >
heading out, back in a bit
22:06
azonenberg_work has quit [Ping timeout: 268 seconds]
22:12
<
whitequark >
azonenberg_mobil: AAAAAAAA
22:12
<
whitequark >
i fucked up endianness
22:12
<
whitequark >
when converting bitarrays to byte arrays when sending to glasgow
22:13
<
whitequark >
because the python "bitarray" package has a completely braindead interface
22:13
* whitequark
stabs bitarray several times
22:13
<
whitequark >
thats why i had bits 7 and 8 do something
22:13
<
whitequark >
those were the strobes...
22:13
<
whitequark >
0 and 1...
22:21
<
azonenberg_mobil >
lolol
22:22
<
azonenberg_mobil >
that would make a lot more sense
22:23
wbraun has joined ##openfpga
22:24
azonenberg_work has joined ##openfpga
22:32
<
whitequark >
no, python is ok here
22:32
<
whitequark >
the library is 3rd party from pypi
22:33
<
whitequark >
and it is a good library other than...
22:33
<
whitequark >
awygle: so it has endianness during conversion to/from bytes an inherent property of the bit arrays
22:33
<
whitequark >
but it's only used in tobytes/frombytes
22:33
<
whitequark >
and you cannot specify it
*in* tobytes/frombytes
22:33
<
whitequark >
this is idiotic
22:33
<
awygle >
sounds idiotic
22:33
<
whitequark >
it is probably an exposed implementation detail but that doesnt justify it
22:34
<
whitequark >
it has been the second worst source of glasgow bugs after weak typing
22:34
<
whitequark >
in python
22:34
<
whitequark >
i just need to wrap it already i think
22:34
<
whitequark >
the default is big endian ofc
22:34
wbraun has quit [Quit: wbraun]
22:34
<
whitequark >
even though it makes no sense because
*bytes* go from lsb to msb
22:34
<
whitequark >
so if you do bitarray('10000000') and feed it to glasgow it reverses everything
22:37
wbraun has joined ##openfpga
22:41
rohitksingh has quit [Ping timeout: 268 seconds]
22:45
azonenberg_work has quit [Ping timeout: 260 seconds]
22:48
<
rqou >
whitequark: this is for the non-xl, but xl is very similar
22:48
<
whitequark >
also i'm nearly done
22:49
<
whitequark >
gimme a sec
22:49
<
rqou >
whitequark: all the cplds have an address map file just like xc2c, but the 9500(xl) are much more in order
22:49
<
rqou >
you've fully REd the bitstream?!
22:49
<
whitequark >
the programming protocol
22:50
<
Bob_Dole >
I would not put it past whitequark to have fully REd something that fast.
22:50
<
whitequark >
i'm not good at RE
22:54
<
whitequark >
ok, i have bitstream readout functional
22:54
<
whitequark >
i... think?
22:55
<
whitequark >
it's PADDED
22:56
<
whitequark >
azonenberg_mobil: your guess was correct
22:56
<
whitequark >
bitstream when read with NON autoincrement goes in blocks of 30 words
22:56
<
whitequark >
so, 15+15
22:56
<
whitequark >
they are spaced out with
22:56
<
whitequark >
11001001110010011100100111001001
22:56
<
whitequark >
01001010010010100000000101001010
22:56
<
whitequark >
in between
22:57
<
whitequark >
also the 1st 24 words appear to be special
22:57
<
azonenberg_mobil >
usercode plus global config?
22:57
<
whitequark >
first 24? no idea, but usercode is unlikely to be there according to JED
22:57
<
azonenberg_mobil >
rqou: wait they have a map file?
22:58
<
whitequark >
it seems to steal bits from bitstream elsewhere
22:58
<
whitequark >
it is also zeroed out entirely here
22:58
<
rqou >
usercode steals bits from elsewhere
22:58
<
rqou >
azonenberg_mobil: yes
22:59
<
rqou >
except the map file has a really obvious pattern
22:59
kem_ has quit [Quit: Connection closed for inactivity]
23:00
<
whitequark >
azonenberg_mobil: ok, so it looks like with self-clocking mode
23:00
<
whitequark >
it first outputs the sync pattern above
23:00
<
whitequark >
then 3 dummy words (?)
23:00
<
whitequark >
then 24 initial words
23:00
<
whitequark >
then it goes through every block afterwards WITHOUT padding
23:04
pie_ has joined ##openfpga
23:06
<
whitequark >
interestingly
23:06
<
whitequark >
the SVF file programs everything in a sequence like
23:06
<
whitequark >
0,1,2,3,4 8,9,10,11,12 16,17,18,19,20
23:08
<
rqou >
sounds vaguely familiar
23:08
<
rqou >
just look at the .map files
23:09
<
rqou >
oh wait you don't have ISE do you
23:09
<
whitequark >
nope lol
23:09
<
rqou >
btw while you're at this can you think about writing .crbit to .svf for xc2c?
23:10
<
whitequark >
rqou: i might be able to uhhhh
23:10
<
whitequark >
write a glasgow "jtag" interface which is actually a thing that writes svf
23:10
<
whitequark >
so every applet that can talk to jtag directly can directly write svf
23:11
<
whitequark >
this needs to, ah, some refactoring
23:11
<
whitequark >
first-class TDO matching and masking
23:11
<
whitequark >
i think
23:11
<
whitequark >
but that's all
23:11
<
rqou >
whatever i don't care for now
23:11
<
whitequark >
but in general glasgow is not supposed to be an svf player
23:11
<
whitequark >
or recorder
23:12
<
whitequark >
i guess i'll add an svf player
23:12
<
whitequark >
it's fundamentally interactive
23:12
<
rqou >
svf player kinda makes sense?
23:12
<
whitequark >
it doesn't
*have* to be i guess
23:12
<
whitequark >
like imagine uh
23:12
<
whitequark >
MIPS EJTAG
23:12
<
whitequark >
the problem is all the register bitfields
23:12
<
rqou >
i still think
_playing_ svf makes sense
23:12
<
whitequark >
playing, yes
23:13
<
whitequark >
i will do that
23:13
<
whitequark >
recording will need to be opt-in from applets i think
23:13
<
rqou >
but whatever, you can just do `vi crbit2svf.{sed|rb|py|c|rs}` for all i care
23:13
<
rqou >
I've just never managed to get around to writing this script
23:14
<
daveshah >
Supporting svf would definitely be handy
23:14
<
rqou >
crbit is already munged into the correct bit ordering
23:14
<
rqou >
so you "just" need to wrap the programming setup commands around it
23:14
<
whitequark >
sure, i'll add svf support, i guess
23:15
<
daveshah >
I partly say that because the Trellis "programming" solution is a similar hacky script to make an svf
23:15
pie_ has quit [Ping timeout: 268 seconds]
23:15
<
daveshah >
For the ecp5 it's nice and easy because you just set things up then shift the whole bitstream in as is
23:15
<
daveshah >
The same bit file that would go to flash or whatever
23:16
<
daveshah >
If you look at the scripts included with Diamond programmer it clearly supports a whole load of interesting commands
23:16
<
daveshah >
undocumented
23:17
<
daveshah >
Manufacturing trim access, also direct access to the serdes config space
23:17
<
daveshah >
Might be fun to play with at some point
23:17
<
daveshah >
I wonder if there's a way to blow the IDCODE fuses even
23:18
<
daveshah >
They obviously have some way of doing that because the same die has different IDCODEs
23:18
<
daveshah >
For 12k/25k and U/UM/UM5G
23:18
<
rqou >
alright, back to driving
23:23
<
azonenberg_mobil >
yeah jtaghal is fundamentally interactive too
23:23
pie_ has joined ##openfpga
23:24
<
azonenberg_mobil >
things like walking arm debug roms arent too practical to do remotely
23:25
<
daveshah >
yeah, I'd only want svf play functionality
23:25
<
azonenberg_mobil >
agreed. i want play in jtaghal
23:25
<
azonenberg_mobil >
but i have no use for record
23:26
Bicyclidine is now known as Bike
23:32
azonenberg_work has joined ##openfpga
23:36
<
pie_ >
something something that one usb controller bricking fest? <whitequark> the SVF file programs everything in a sequence like
23:38
<
pie_ >
eh nevermind
23:39
<
pie_ >
i forgot the name of the company that makes ubiquitous usb controller chip things, and then they did a firmware update that started briching stuff. i think there was something about legit chips writing half-words and counterfeits zeroing the top half or something
23:52
Zylellrenfar has quit [Quit: Bye bye~]
23:53
Zylellrenfar has joined ##openfpga