I've tried to compile your test program, but shows me the following message:
C:/spin2gui/samples/ATE_Test_v8_180x8.spin2(274) error: syntax error, unexpected identifier `frac', expecting instruction modifier or end of line or ','
I've tried to compile your test program, but shows me the following message:
C:/spin2gui/samples/ATE_Test_v8_180x8.spin2(274) error: syntax error, unexpected identifier `frac', expecting instruction modifier or end of line or ','
Kind regards, Samuel Lourenço
I think Spin2gui is not yet supporting 'frac' as an operator for constant expressions. 'A frac B' is like an unsigned divide of 'A<<32 / B', where A < B.
I've tried to compile your test program, but shows me the following message:
C:/spin2gui/samples/ATE_Test_v8_180x8.spin2(274) error: syntax error, unexpected identifier `frac', expecting instruction modifier or end of line or ','
Kind regards, Samuel Lourenço
I think Spin2gui is not yet supporting 'frac' as an operator for constant expressions. 'A frac B' is like an unsigned divide of 'A<<32 / B', where A < B.
It don't work on published versions (up to 33k) of Pnut either.
Oops. I've been updating PNut here and haven't put out my version because it's handling PTRx instructions as the next silicon requires. If you can compute the FRAC value manually (a/b × power(2,32)), it should work.
You'd need to use a calculator. '20 frac 33' is $9B26C9B2.
Yes, thanks.
But how come I can't get the bottom 9 bits with the preprocessors? eg: round(2.0*1024.0*1024.0*1024.0 * 2.0 / 3.3)<<1 always produces $9B26CA00 with both Pnut and Fastspin. It's been rounded up to fit into something like 24 bits. I was expecting to get 31 bits worth out of that
You'd need to use a calculator. '20 frac 33' is $9B26C9B2.
Yes, thanks.
But how come I can't get the bottom 9 bits with the preprocessors? eg: round(2.0*1024.0*1024.0*1024.0 * 2.0 / 3.3)<<1 always produces $9B26CA00 with both Pnut and Fastspin. It's been rounded up to fit into something like 24 bits. I was expecting to get 31 bits worth out of that
It's because the floating point math is 32 bits (single size float) and there's only a 23-bit mantissa. It doesn't matter in that application, though. It's only checking for 3% accuracy.
Where there's a will, there's a way. Is that the only impediment to compilation?
Have you run it on the Eval board? You'll need to run 1MHz into P62 via a 1k resistor. Then, you should see the four middle blue LEDs come on, indicating test passage. If there are any pin errors, the first four pins will be shown on the four 16 bit groups of pins as {2'b0, pin_number[5:0], error_code[7:0]}, from bottom, up.
Where there's a will, there's a way. Is that the only impediment to compilation?
Yep, it's all clean compile from there.
No, haven't tried running it.
EDIT: Apologies for the short reply, I was on the phone at the time. My signal generator is with someone else at the moment. Tomorrow, I'll hack up something quick on the Prop1 that is lying around. Should be an easy job, but I know my inexperience on the Prop1 will have me floundering anyway.
I managed to run your program, with the "20 frac 33" replaced by "$9B26C9B2". However, the test doesn't pass, since P57, P58, P61 and P62 light up, indicating a failure. I've verified that the injected 1MHz clock simply doesn't go past the series 1K resistor. You can see the scope images attached.
Have you run it on the Eval board? You'll need to run 1MHz into P62 via a 1k resistor. Then, you should see the four middle blue LEDs come on, indicating test passage.
Success, it passed.
Took me a little while to get everything right with wiring, forgetting the 1k resistor, learning how to write any Spin at all to make the Prop1 produce the 1 MHz signal, getting comports mixed, and finally not realising the 1 MHz had to be running non-stop before the Prop2 test starts.
EDIT: And here's my almighty somewhat copied clock gen
con
_clkmode = xtal1 + pll16x
_xinfreq = 5_000_000 ' use 5MHz crystal
obj
debug : "FullDuplexSerial" ' use Parallax Serial Terminal
var
pub main | char
debug.start(31, 30, %0000, 115_200) ' Start terminal
waitcnt(clkfreq + cnt) ' 1 second pause
debug.str(string(13,10,"Press any key to start 1 MHz clock: "))
debug.rx
debug.str(string("RUNNING",13,10))
' mode PLL BPIN APIN
ctra := %00100_000 << 23 + 1 << 9 + 0 'Establish mode and APIN (BPIN is ignored)
frqa := $8000_0000/40 'Set FRQA so PHSA[31] toggles every clock
dira[0] := 1 'Set APIN to output
repeat 'infinite loop, so counter continues to run
Have you run it on the Eval board? You'll need to run 1MHz into P62 via a 1k resistor. Then, you should see the four middle blue LEDs come on, indicating test passage.
Success, it passed.
Took me a little while to get everything right with wiring, forgetting the 1k resistor, learning how to write any Spin at all to make the Prop1 produce the 1 MHz signal, getting comports mixed, and finally not realising the 1 MHz had to be running non-stop before the Prop2 test starts.
Your P2 is good!
We had a heck of a time eliminating false fails in the test procedure, due to those thermal settling issues. An ADC needs 10us to get out of bed.
I suppose that is good to be sure about. I hadn't considered it could fail. Well, other than me making a mistake that is.
The intent of the test is to detect manufacturing defects which ON Semi would miss with their digital-only test. It can be run anytime, though, to see if your pins are (still) okay.
Well 128 P2's can handle 8,192 pins and that digital and analog. just slower, I guess.
Anyways,
Mike
The T2000 testers typicall consist of a controller, which is a rack of equipment about the size of two refrigerators side by side and a test head that is perhaps 4'x4'x3'. The controller contains a refrigeration system as well as multiplexers, power supplies and multiple rack mounted PCs used as the actually controllers, one for the system and one for each device under test. The test head is connected by a thick bundle of cables, a big bundle of fiber optics, and two hoses for the special fluorocarbon coolant that cools the test head. The test head contains multiple option boards which can be configured for whatever devices are being tested. They are packed in with virtually no extra space and have aluminum cooling jackets on bother sides and fittings for coolant lines. Its some pretty hardcore tech.
Did you have to modify the 3V3 DC-DC circuit? I see a resistor hanging there. That might be the reason why my P2 doesn't pass. I've noticed that the 1MHz clock goes through briefly as P62 goes to high impedance, but it is erratic. Reminds me of an I2C or SPI signal.
Comments
Well 128 P2's can handle 8,192 pins and that digital and analog. just slower, I guess.
Anyways,
Mike
I've tried to compile your test program, but shows me the following message:
Kind regards, Samuel Lourenço
I think Spin2gui is not yet supporting 'frac' as an operator for constant expressions. 'A frac B' is like an unsigned divide of 'A<<32 / B', where A < B.
I've confirmed that. It doesn't work with the latest version of Spin2gui either, as well as the previous one.
Kind regards, Samuel Lourenço
Oops. I've been updating PNut here and haven't put out my version because it's handling PTRx instructions as the next silicon requires. If you can compute the FRAC value manually (a/b × power(2,32)), it should work.
EDIT: Or maybe it's that they calculate with 32 bits so there is only the lower 31 bits usable for unsigned results.
power() doesn't exist either!
You'd need to use a calculator. '20 frac 33' is $9B26C9B2.
But how come I can't get the bottom 9 bits with the preprocessors? eg: round(2.0*1024.0*1024.0*1024.0 * 2.0 / 3.3)<<1 always produces $9B26CA00 with both Pnut and Fastspin. It's been rounded up to fit into something like 24 bits. I was expecting to get 31 bits worth out of that
It's because the floating point math is 32 bits (single size float) and there's only a 23-bit mantissa. It doesn't matter in that application, though. It's only checking for 3% accuracy.
EDIT: Here's a tidier version using the preprocessor
Where there's a will, there's a way. Is that the only impediment to compilation?
Have you run it on the Eval board? You'll need to run 1MHz into P62 via a 1k resistor. Then, you should see the four middle blue LEDs come on, indicating test passage. If there are any pin errors, the first four pins will be shown on the four 16 bit groups of pins as {2'b0, pin_number[5:0], error_code[7:0]}, from bottom, up.
It based on Cluso's original
I had converted it to floats to gain, I thought, extra bits of resolution.
I guess it didn't help?
No, haven't tried running it.
EDIT: Apologies for the short reply, I was on the phone at the time. My signal generator is with someone else at the moment. Tomorrow, I'll hack up something quick on the Prop1 that is lying around. Should be an easy job, but I know my inexperience on the Prop1 will have me floundering anyway.
I managed to run your program, with the "20 frac 33" replaced by "$9B26C9B2". However, the test doesn't pass, since P57, P58, P61 and P62 light up, indicating a failure. I've verified that the injected 1MHz clock simply doesn't go past the series 1K resistor. You can see the scope images attached.
Kind regards, Samuel Lourenço
I scrapped about 9 of those last year. Seriously.
Took me a little while to get everything right with wiring, forgetting the 1k resistor, learning how to write any Spin at all to make the Prop1 produce the 1 MHz signal, getting comports mixed, and finally not realising the 1 MHz had to be running non-stop before the Prop2 test starts.
EDIT: And here's my almighty somewhat copied clock gen
EDIT: Added photo of scope.
Your P2 is good!
We had a heck of a time eliminating false fails in the test procedure, due to those thermal settling issues. An ADC needs 10us to get out of bed.
Wow. I'm only averaging 10s these days !
That probably doesn't even include the time required to think about getting out of bed, before you actually do it.
The intent of the test is to detect manufacturing defects which ON Semi would miss with their digital-only test. It can be run anytime, though, to see if your pins are (still) okay.
The T2000 testers typicall consist of a controller, which is a rack of equipment about the size of two refrigerators side by side and a test head that is perhaps 4'x4'x3'. The controller contains a refrigeration system as well as multiplexers, power supplies and multiple rack mounted PCs used as the actually controllers, one for the system and one for each device under test. The test head is connected by a thick bundle of cables, a big bundle of fiber optics, and two hoses for the special fluorocarbon coolant that cools the test head. The test head contains multiple option boards which can be configured for whatever devices are being tested. They are packed in with virtually no extra space and have aluminum cooling jackets on bother sides and fittings for coolant lines. Its some pretty hardcore tech.
Does of count if I dream got out of bed and went to work.
Did you have to modify the 3V3 DC-DC circuit? I see a resistor hanging there. That might be the reason why my P2 doesn't pass. I've noticed that the 1MHz clock goes through briefly as P62 goes to high impedance, but it is erratic. Reminds me of an I2C or SPI signal.
Kind regards, Samuel Lourenço