Register a SA Forums Account here!
JOINING THE SA FORUMS WILL REMOVE THIS BIG AD, THE ANNOYING UNDERLINED ADS, AND STUPID INTERSTITIAL ADS!!!

You can: log in, read the tech support FAQ, or request your lost password. This dumb message (and those ads) will appear on every screen until you register! Get rid of this crap by registering your own SA Forums Account and joining roughly 150,000 Goons, for the one-time price of $9.95! We charge money because it costs us money per month for bills, and since we don't believe in showing ads to our users, we try to make the money back through forum registrations.
 
  • Locked thread
JawnV6
Jul 4, 2004

So hot ...

Mido posted:

I got stuck on the latch mechanism :/ couldn't figure out how to make it simpler

2 nor's is working fine, except that it's ringing before either s or r is applied, only giving 95% on the verification

i kept getting odd results with the oscillator, i wish there was some simple way to hook a bunch of inverters together like I can with non-inverters

Adbot
ADBOT LOVES YOU

Jerry Bindle
May 16, 2003
not having a ground connection is messing up my head, i can't do it. how are you supposed to do these without a gnd? i got as far as doing the 4-input-and, but i have some kind of mental block on the 4-or

Jerry Bindle
May 16, 2003
i was over thinking it -- you don't have to think about currents/voltages, just delay and logic. finally got the POR working, but im stumped on the oscillator. i get the idea that it should have an inverter ring, but... hmm.

Bloody
Mar 3, 2013

is there a way to parameterize a range in verilog? like i can do:
code:
localparam top = 7;
localparam bot = 0;
reg [31:0] foo;
...
if(foo[top:bot] == 8'haa)...
is there a way to just make top:bot as a named parameter so i can just have foo[range] instead?

like
code:
localparam range = 7:0;

if(foo[range] == 8'haa)...

JawnV6
Jul 4, 2004

So hot ...
`define will do it, but is global instead of a parameter and idk about stuffing parameters into one

most things should be going down to 0 anyway??

i remember seeing a lot of things constructed as BITFIELD_H:BITFIELD_L when both ends had to be parameterized

Barnyard Protein posted:

not having a ground connection is messing up my head, i can't do it. how are you supposed to do these without a gnd? i got as far as doing the 4-input-and, but i have some kind of mental block on the 4-or
yeah its weird to only be doing half the work but it'd get nasty to do the low side with only one metal layer

Bloody
Mar 3, 2013

Yeah I should probably be using structs or something but they're probably not supported also I don't know how to use them :3:

EIDE Van Hagar
Dec 8, 2000

Beep Boop

Bloody posted:

is there a way to parameterize a range in verilog? like i can do:
code:
localparam top = 7;
localparam bot = 0;
reg [31:0] foo;
...
if(foo[top:bot] == 8'haa)...
is there a way to just make top:bot as a named parameter so i can just have foo[range] instead?

like
code:
localparam range = 7:0;

if(foo[range] == 8'haa)...

you can do a indexed part select to pick out a range

EIDE Van Hagar
Dec 8, 2000

Beep Boop
http://www.esperan.com/view_tutorial.php?tutorialNumber=21

useful for packing and unpacking bits, like when you are selecting a smaller chunk of a large piece of data one chunk at a time. for serializing parallel data or gathering serial data into a larger parallel data structure or something.

Bloody
Mar 3, 2013

the synthesis tool supports structs but the toolchain's linter/pre-synth checker thing doesn't so it won't allow the code to make it to the synthesis stage

lol

thanks, microsemi

thankrosemi

Bloody
Mar 3, 2013

oh, apparently it'll let you synthesize poo poo that fails linting but it breaks the poo poo out of the block view tool thing

intriguing

Bloody
Mar 3, 2013

this is my punishment for doing top-level wire connecting in a "SmartDesign". uguguhguhguhghghghh

JawnV6
Jul 4, 2004

So hot ...

kwinkles posted:

http://www.esperan.com/view_tutorial.php?tutorialNumber=21

useful for packing and unpacking bits, like when you are selecting a smaller chunk of a large piece of data one chunk at a time. for serializing parallel data or gathering serial data into a larger parallel data structure or something.

i have a genuine, burning hatred for tutorials that act like simulation-only constructs are Good and the synthesizable subset is some wacky restriction that a Good Designer wouldn't sully themselves with

$display("hello world") is not a HDL's hello world, blink a freakin LED or something

Bloody
Mar 3, 2013

or output hello world over a 9600 baud serial port

Bloody
Mar 3, 2013

my not-a-microcontroller now has two opcodes, one where it does the things it was made to do in the first place, the other for making loops a thing

but what if i want a loop inside a loop? that would be useful!!!

my not-a-microcontroller might be about to get a stack

or just a couple more loop instructions that are functionally identical but use different dedicated loop counter variables :effort:

Bloody
Mar 3, 2013

poo poo, i wish this had branching

[overengineering intensifies]

Bloody
Mar 3, 2013

this is all so awful i am a bad engineer

eschaton
Mar 7, 2007

Don't you just hate when you wind up in a store with people who are in a socioeconomic class that is pretty obviously about two levels lower than your own?
just implement subtract and branch if not zero, then you'll never need another instruction

The Eyes Have It
Feb 10, 2008

Third Eye Sees All
...snookums
loving hell man, im using a 6 bit i2c dac chip (aka digital pot) and dear datasheet would it be so loving hard to say:

Usage [via I2C]
Addressing: The unit has two hardcoded I2C addresses, X or Y. Use either one.

Writing new position: to set the wiper to a new position, send two bytes to the unit. First byte is command code 0x00. Second byte is the new wiper position. Position can be any value up to 0x7F (MSb is don't care) but only values between 0x00 and 0x40 are considered valid. Any value above 0x40 is treated same as 0x40.

Reading last position set: request 1 byte from the unit, it will respond with the last written wiper position value. (Note: device powers up at position 0x20 (50%) but will respond with a 0x00 - read only returns the last position written by the user.)




the actual datasheet buries that simple loving information that should be available at a glance inside what is basically a several pages long treatise on bit-banging i2c at a low level

like nowhere does it tell you the actual commands (for example) except buried in i2c timing diagrams, like it's indistinguishable from a generalized timing reference on bit banging i2c complete with X D6 D5 D4 D3 D2 D1 D0 for data payload buried in a diagram of an entire i2c conversation and oh you did realize that D6-D0 payload that appeared there while we go on and on about stop bits and poo poo isn't a placeholder it literally is the how a new wiper value is set and thats the only place we tell you how to actually talk to the part, right?

Bloody
Mar 3, 2013

pyf terrible datasheets

Jerry Bindle
May 16, 2003
i feel bad for people who don't either sit up in an ivory tower at a si company and thus have no need for a data sheet, or order in large enough volume to have a field engineer's cell #.

Star War Sex Parrot
Oct 2, 2003

i like Atmel data sheets

hobbesmaster
Jan 28, 2008

Bloody posted:

pyf terrible datasheets

any one that is incorrect

hobbesmaster
Jan 28, 2008

though one time seeing the faces of a pair of engineers after going through the verilog on their chip and them coming to the realization that the documented thing i was trying to do was completely impossible almost made up for the wasted time. almost.

Sweevo
Nov 8, 2007

i sometimes throw cables away

i mean straight into the bin without spending 10+ years in the box of might-come-in-handy-someday first

im a fucking monster

Bloody posted:

pyf terrible datasheets

everything written before ~1990.

"complete 8-bit microcontroller with built-in peripherals? yeah we can cover all the details in 40 pages. timing diagrams, why would you want those? and lmao what the hell are electrical specifications? we said it runs on 5V what more do you want?!"

Sweevo
Nov 8, 2007

i sometimes throw cables away

i mean straight into the bin without spending 10+ years in the box of might-come-in-handy-someday first

im a fucking monster

for reals tho, the worst is every datasheet written by microchip

Sapozhnik
Jan 2, 2005

Nap Ghost
the worst is everything produced by microchip

Jerry Bindle
May 16, 2003

Sweevo posted:

for reals tho, the worst is every datasheet written by microchip

ding ding ding ding

Jerry Bindle
May 16, 2003

Mr Dog posted:

the worst is everything produced by microchip

ding ding ding ding

Jerry Bindle
May 16, 2003
i've recently written pic datasheet and boy are my appendages that are used to navigate disastrously poor documentation processes tired

Bloody
Mar 3, 2013

when we make chips we don't gently caress around. documentation? gently caress that. who needs that.

we have an entire family of chips where the interface documentation is two sentences in a text file and a single picture of a timing diagram and i made both of them after reverse-engineering the interface so i could test the loving things

those 8 registers? yep, i bet they do something

The Eyes Have It
Feb 10, 2008

Third Eye Sees All
...snookums
Speaking of janitoring bits, I have some NXP 74HC00s that I suspect are actually 74HC04s because a) it says 7404 somewhere in the mess of letters and numbers on the chip and b) the part of the board its on doesn't fuckin work

My supplier is digging in their heels that the parts they shipped are correct so I'd like someone who can actually translate the insane gibberish markings to tell me one way or the other so I can know if I'm the moron in this situation or not. Chip says HC00 EC57404 TXD14 29H where I see an "HC" (so far so good) and I see 7404 but then again I also see 00 in there and I want to be sure.

Anyone have any suggestions for me? Everything at NXP's site for tech related questions points me to their online community portal where there have been three questions posted in the past 4 months, only one of which has been answered so I'm not super jazzed about that.

e: well what do you know, I got an answer from NXP. It's a 7400 so I'm the dummy.

The Eyes Have It fucked around with this message at 17:01 on Jul 22, 2015

JawnV6
Jul 4, 2004

So hot ...
never trust a marking

Sweevo
Nov 8, 2007

i sometimes throw cables away

i mean straight into the bin without spending 10+ years in the box of might-come-in-handy-someday first

im a fucking monster

Mister Sinewave posted:

Speaking of janitoring bits, I have some NXP 74HC00s that I suspect are actually 74HC04s because a) it says 7404 somewhere in the mess of letters and numbers on the chip and b) the part of the board its on doesn't fuckin work

My supplier is digging in their heels that the parts they shipped are correct so I'd like someone who can actually translate the insane gibberish markings to tell me one way or the other so I can know if I'm the moron in this situation or not. Chip says HC00 EC57404 TXD14 29H where I see an "HC" (so far so good) and I see 7404 but then again I also see 00 in there and I want to be sure.

Anyone have any suggestions for me? Everything at NXP's site for tech related questions points me to their online community portal where there have been three questions posted in the past 4 months, only one of which has been answered so I'm not super jazzed about that.

e: well what do you know, I got an answer from NXP. It's a 7400 so I'm the dummy.

HC00 would be the part number.
EC57404 is probably some kind of batch number or manufacturing code that randomly happens to have 7404 in it.
TXD1429 will be a date code (29th week of 2014)

The Eyes Have It
Feb 10, 2008

Third Eye Sees All
...snookums
Thanks, I learned something. It didn't help that the supplier wouldn't really go on record confirming which part it was exactly, just that they "shipped correctly". So I'm glad to have it confirmed.

movax
Aug 30, 2008

Mr Dog posted:

the worst is everything produced by microchip

whoa buddy let's not say things that we can't take back

Fanged Lawn Wormy
Jan 4, 2008

SQUEAK! SQUEAK! SQUEAK!
worst datasheets are the pdfs that are very long and don't hyperlink indexes or the "see other section" references inside chapters

Sapozhnik
Jan 2, 2005

Nap Ghost

movax posted:

whoa buddy let's not say things that we can't take back

I'm sure their analog poo poo is fine it's just like

so they have an 802.15.4 radio right

it has like a zillion registers for some reason. a small address space and a big address space for two different sets of registers.

well there's one register in the big address space that's just like, "state machine state". a bunch of state codes and symbolic names are given. no meaning for any of these states is given. ok nbd.

turns out though, it also has a hardware auto-ack. you kind of need to have one in order to turn around ack packets fast enough. turns out if you want to transmit you actually have to do the following actions in addition to all the steps they describe:

1. disable reception (actually you can't. the datasheet tells you to disable reception by enabling a bit that causes the digital frontend to decode 1s as 0s and vice versa, which basically is guaranteed to cause the deframe unit to reject everything)

2. watch the semi-undocumented state register and wait for it to go to the quiescent state before transmitting

then re-enable reception obv

if you try to transmit while the hardware mac is sending an auto-ack it just loving locks up forever. it's cool though, i mean it's not like anybody would ever try to transmit a packet in response to another packet or anything rofl

and that's actually pretty mild as microchip wtfs go, i don't even have to program PICs thank god or i'd have probably managed to drink myself to death by now





oh yeah, an honest to god erratum for that chip: "if you enable the encryption and authentication engine then sometimes the hardware HMAC will reject a valid packet. retransmit if that happens. sorry :("

ok i made up the "sorry :(" part

Jerry Bindle
May 16, 2003
the pic16's and pic18's are pretty solid. if you're using anything else then i hope you have access to a good FAE!

Hesh Ballantine
Feb 13, 2012
im working on a project to upgrade some lab equipment used in photon coincidence counting, basically replicating a NIST setup that uses FPGAs for time-stamping coincidences with about 2.5ns resolution

http://www.nist.gov/pml/div684/grp03/multicoincidence.cfm

ask me about janitoring quantum entanglement detection apparatus, idk is this even the right thread for this thing?

Adbot
ADBOT LOVES YOU

Jerry Bindle
May 16, 2003

Hesh Ballantine posted:

im working on a project to upgrade some lab equipment used in photon coincidence counting, basically replicating a NIST setup that uses FPGAs for time-stamping coincidences with about 2.5ns resolution

http://www.nist.gov/pml/div684/grp03/multicoincidence.cfm

ask me about janitoring quantum entanglement detection apparatus, idk is this even the right thread for this thing?

yeah you're in the right place imo. i'm surprised to see 2.5ns resolution with an off-the-shelf FPGA board. i would have suspected that you'd need a special pcb layout to make sure the lengths are correct and the impedances matched. what kind of analog front end are you using?

  • Locked thread