Getorix has quit [Read error: Connection reset by peer]
mwk has quit [Ping timeout: 268 seconds]
<mtrbot-ml>
[mattermost] <sb10q> does someone know why a DPSS green laser pointer can get 10s of mW out of a PPKTP doubler crystal that costs $2, whereas every lab setup involves a $$$$$ and finicky enhancement cavity with unobtainium mirrors? is there something special about the 532nm wavelength that makes this exceptionally easy?
rohitksingh has joined #m-labs
proteusguy has quit [Ping timeout: 268 seconds]
airwoodix3 has joined #m-labs
rohitksingh has quit [Ping timeout: 260 seconds]
airwoodix has quit [Ping timeout: 268 seconds]
airwoodix3 is now known as airwoodix
<awygle>
whitequark: did nmigen change the name of TSTriple, or the whole approach? doesn't seem to be called that anymore at least
Dar1us has quit [Ping timeout: 272 seconds]
Dar1us has joined #m-labs
proteus-guy has joined #m-labs
forrestv has quit [Ping timeout: 248 seconds]
forrestv has joined #m-labs
X-Scale has joined #m-labs
<_whitenotifier-3>
[nmigen] awygle opened issue #315: FSM with transition to nonexistent state should not elaborate - https://git.io/JvmhW
Dar1us has quit [Ping timeout: 248 seconds]
Dar1us has joined #m-labs
m4ssi has joined #m-labs
Dar1us has quit [Ping timeout: 268 seconds]
Dar1us has joined #m-labs
cr1901_modern has quit [Ping timeout: 265 seconds]
cr1901_modern has joined #m-labs
mwk has joined #m-labs
proteus-guy has quit [Ping timeout: 268 seconds]
Getorix_ has quit [Ping timeout: 268 seconds]
Getorix has joined #m-labs
kbeckmann has quit [Ping timeout: 240 seconds]
Getorix has quit [Ping timeout: 260 seconds]
Getorix has joined #m-labs
proteusguy has joined #m-labs
lkcl has joined #m-labs
kbeckmann has joined #m-labs
rohitksingh has joined #m-labs
Stormwind_mobile has quit [Ping timeout: 265 seconds]
futarisIRCcloud has quit []
futarisIRCcloud has joined #m-labs
<mtrbot-ml>
[mattermost] <dpn> @sb10q: Nothing magic about 532 nm – the number just tends to crop up because it's the second harmonic of 1064 nm, which you can easily get at high powers from Nd-doped solid-state materials. Regarding unobtainium mirrors vs. cheap laser pointers, it's just a question of conversion efficiency, stability/beam quality, and of course mass manufacturing – it's been a while since <message clipped>
<mtrbot-ml>
[mattermost] <dpn> (NB: By intracavity doubling, the cavity referred to is the cavity of the laser producing the fundamental, not an external enhancement cavity.)
<mtrbot-ml>
[mattermost] <dpn> (And regarding 1064 nm being available in good beam quality at high powers relatively easily, this is very relevant as SHG is a non-linear process; excluding pump depletion/… effects, the doubling *efficiency* goes linear with the input intensity.)
Dar1us has quit [Ping timeout: 246 seconds]
Stormwind_mobile has joined #m-labs
Dar1us has joined #m-labs
Dar1us has quit [Ping timeout: 245 seconds]
Stary has quit [Ping timeout: 272 seconds]
Dar1us has joined #m-labs
Stary has joined #m-labs
<mtrbot-ml>
[mattermost] <sb10q> there is no intracavity doubling
<mtrbot-ml>
[mattermost] <sb10q> there's a 808nm diode, followed by the Nd crystal (with reflective coatings forming a cavity) followed by the KTP crystal
<mtrbot-ml>
[mattermost] <sb10q> the KTP crystal isn't in any sort of cavity as far as I can tell
<mtrbot-ml>
[mattermost] <sb10q> but I
<mtrbot-ml>
[mattermost] <sb10q> 'm happy to experiment further with it if you think there is one
<mtrbot-ml>
[mattermost] <sb10q> like cutting it in half and see if it still produces green light
ktemkin has quit []
ktemkin has joined #m-labs
futarisIRCcloud has quit [Quit: Connection closed for inactivity]
daveshah has quit []
daveshah has joined #m-labs
Stormwind_mobile has quit [Ping timeout: 268 seconds]
rohitksingh has quit [Ping timeout: 245 seconds]
mumptai has joined #m-labs
rohitksingh has joined #m-labs
m4ssi has quit [Remote host closed the connection]
MikeP has joined #m-labs
<MikeP>
Hey, I'm curious if it's possible to write a Clock Divider in nmigen that uses both positive and negative edges of the sync clock?
<MikeP>
(If I understand the ClockDivisor example in nmigen/examples/basic/arst.py , even a factor of 1 will half the rate of the clock vs sync.)
<MikeP>
(fair to decent chance I'm not understanding that fully though!)
rohitksingh has quit [Ping timeout: 260 seconds]
<MikeP>
(In my example I'd naively assumed I could get a 4MHz clock by dividing from my 12MHz clock, but I'm now not sure how)
rohitksingh has joined #m-labs
<Sarayan>
from what I understand, different edges are different clock domains
<Sarayan>
I'm not sure how you turn a signal into a clock domain "generator" TBH
<whitequark>
MikeP: no, and even if you did, it wouldn't really synthesize
<whitequark>
dual edge flip flops are rarely supported and verilog tooling tends to not recognize them either
<MikeP>
(only in sim right now. Haven't tried to synthesize anything yet)
<Sarayan>
wq, been wondering, say I want to do an oric 1 in nmigen
<whitequark>
one of the goals of nmigen is to avoid having nonsynthesizable constructs
<Sarayan>
that's a 1MHz 6502, 6522 and ay8912, plus a 32MHz ULA that does address decode, video and generates the 1MHz clock
<MikeP>
Doing that first by creating another clock domain that inverts the signal from the first, doing a timer in each CD, then summing the the timers in comb
<whitequark>
and this clock divider, even if you could synthesize it, would be a timing nightmare
<Sarayan>
6502, 6522, probably even the ay, they need both edges
<whitequark>
you could certainly implement clock.v as written with two clock domains
<whitequark>
but clk_out wouldn't be usable as a clock downstream
<Sarayan>
how is one supposed to do that?
<whitequark>
since it would contain many glitches
<MikeP>
why the timing nightmare? (apologies for the noob question - I have been reading up)
<whitequark>
Sarayan: your case is different
<whitequark>
you have essentially two clocks with a defined phase relationship
<whitequark>
that happen to share a signal
* Sarayan
sits down and listens
<whitequark>
the case of MikeP is problematic because of this line: assign clk_out = ((pos_count == 2) | (neg_count == 2));
<Sarayan>
ahhh
<whitequark>
in simulation, this combinatorial operation happens instantaneously
<whitequark>
in hardware, not so much
<whitequark>
so you'll get glitches
<MikeP>
ah gotcha
<Sarayan>
the "don't drive the same signal from multiple clock domains" issue?
<whitequark>
the code MikeP linked to doesn't do that
<MikeP>
So is there a sane/safe way to get a 4MHz clock out of a 12MHz base clock?
<whitequark>
pos_count is driven from one domain, neg_count from another
<whitequark>
MikeP: what are you doing specifically with the 4 MHz clock?
<whitequark>
there are a few ways, and the best one depends on your case
<whitequark>
if you just need to slow your logic down 3 times, I suggest using EnableInserter and running your entire circuit on the 12 MHz clock
<Sarayan>
MikeP: what's the problem with clk_out = pos_count < 3 and wrapping at 6?
<whitequark>
(btw, Sarayan, you could also do that; you could run your circuit at 2× the original clock and use pos/neg enable strobes)
<Sarayan>
wq: that would be 32x, but I'd like the keep the sub-components clean, with two clock domains and no hypothesis on what's around
<whitequark>
32x?
<MikeP>
Right now I'm driving a DAC via SPI and also monitoring that signal from another microcontroller
<whitequark>
oh, ULA
rohitksingh has quit [Ping timeout: 268 seconds]
<Sarayan>
yeah. One reason I like nmigen is that it's several orders of magnitude more readable than verilog or vhdl. I'd like to keep it that way :-)
<whitequark>
Sarayan: oh, but you don't have to change it much
<whitequark>
you can give EnableInserter the enables per clock domain
<whitequark>
so rather than having pos/neg domains driven by fclk at different edges,
<Sarayan>
hmmm, I currently have no idea what EnableInserter is
<whitequark>
you would have pos/neg domains driven by fclk*2 with two enables that are out of phase
<whitequark>
most of your code looks exactly the same, only the very toplevel part differs
<whitequark>
ok, so, you know what a DFFE is, vs. a DFF?
<Sarayan>
I know neither of the two acronyms :-)
<Sarayan>
FF = Flip Flop?
<MikeP>
Saryan on "clk_out = pos_count < 3 and wrapping at 6?" - Not sure I fully understand you, but if I only used pos_count, then flipping at 3 "ticks" means a clock division of 6, where I was after a division of 3
<MikeP>
Anyways, I can work around this, and thanks for the help folks.
<whitequark>
MikeP: if you don't need 50% duty cycle specifically you can just have the divided clock active for 2 cycles of original clock out of 3
<Sarayan>
MikeP: you are indeed correct
<whitequark>
whether you need 50% duty cycle depends on what exactly that 4 MHz clock is driving
<whitequark>
if it's some synchronous logic, usually 66% duty cycle would be just fine
<MikeP>
Honestly I think a workaround here is better than sacrificing an assumption of "safer" timing... I imagine I'd end up just digging myself a hole...
<Sarayan>
or, that's 12MHz, not 32. And amusingly the clock is 33% duty cycle
<Sarayan>
or 66, however you count
<MikeP>
I did have a separate piece of code driving the DAC that was able to use an inverted clock domain for setting SPI data before the clock ticked on sync, and that was fine when synthesized. In that case the timing wasn't critical (as long as the data was set sometime before the clock tick) and I was never combining the signals.
<whitequark>
in general you want to avoid having multiple clock domains for as long as possible, it just makes everything nicer
<MikeP>
but was hoping I could generalize that into a clock divider. It's honestly not important for what I'm doing. After a bit I just saw it as a challenge. Letting go now :-)
<MikeP>
Thanks!
<whitequark>
because you never have to think about whether some issue is a logic bug or a CDC error, and there is much less opportunity for sim/synth mismatch
rohitksingh has joined #m-labs
yuriks has quit []
yuriks has joined #m-labs
<_whitenotifier-3>
[nmigen] awygle closed issue #315: FSM with transition to nonexistent state should not elaborate - https://git.io/JvmhW
rohitksingh has quit [Ping timeout: 265 seconds]
Stormwind_mobile has joined #m-labs
rohitksingh has joined #m-labs
MikeP has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
MikeP has joined #m-labs
Stormwind_mobile has quit [Ping timeout: 260 seconds]
Stormwind_mobile has joined #m-labs
MikeP has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
zkms has quit [Quit: reboot@]
zkms has joined #m-labs
rohitksingh has quit [Ping timeout: 268 seconds]
lkcl_ has joined #m-labs
Stormwind_mobile has quit [Ping timeout: 272 seconds]
rohitksingh has joined #m-labs
Stormwind_mobile has joined #m-labs
Stormwind_mobile has quit [Read error: Connection reset by peer]
Stormwind_mobile has joined #m-labs
lkcl_ has quit [Remote host closed the connection]