Using EDA Playground

So to write Verilog code you need to write a testbench.

The #10 type things are delays.

The dumpfile thing is needed by edaplayground

The reset logic was necessary or else the submodule had unspecified values

Make sure to check the open EPWave box on the side

Everything needs to be wrapped in a module endmodule.

The .clk is specifying the parameter. the clk inside the parentheses is the reg I’m passing it.

I set reset high. Wait, then turn it low.

To end the simulation you need the $finish command.

 

specify how this module can connect to the outside world

<= is some kind of sequential assignment. It tends to be what is used in these posedge type blocks.

= is used to form aliases using the assign command

If else stuff is fairly self explanatory

begin end are the equivalent of {} in other languages

 

Openscad Text Cut

http://repraprip.blogspot.com/2011/05/inkscape-to-openscad-dxf-tutorial.html

Need to save as a dxf

In Inkscape convert to path

Then select all nodes and click convert to line and add nodes.

Put it near to 0,0 corner so you can see it.

Save

Put the files in the same place as the scad file

 

 

 

Gnuradio Delay Correlation

Trying to develop some software for coherent rtl synchronization. This is the first step, using internal gnuradio signal sources. Thinking that’ll we’ll use this setup + a synchronize button that will set the current delay. Or maybe sliders. Would kind of suck to have to synchronize manually every time, but not horrible. Maybe the synchronize button will set the slider values to the appropriate places. And could enable or disable all the extra processing with valve. Okay, did that. Set True to 0 default to 0 and false to 1 in gui checkbox. Then run that variable into the valve leading into all the correlation stuff.

Check this out. Learned some things. Stream to Vector packs such and such samples into a stream of vectors. Kind of ubiquitous in gnu radio, so I’m not sure why I didn’t know about this already.

That is what you need for the fft

When you change the vector size, you need to change the window size parameter in the fft too or else you get an error.

delay_test.grc

 

https://en.wikipedia.org/wiki/Cross-correlation

You’ll see that one way to calculate it is to fourier transform, conjugate multiply, then inverse fourier transform. We then plot this on a vector sink. And use the argmax to find the peak delay. It works really damn well in this simulation, but real world performance is to be determined. When the total delay is more than ~800 using vector size of 2048, it loses the peak. Negative delay wraps around back. That dip in the correlation is almost certainly due to the windowing done by the fft.

Hackrf

Got a hackrf. Sqeet.

 

Made  quick little fm transmitter.

Only goes a couple feet, so should be okay wherever you do it.

Also doing it on our ham freqeuncies, so doubly so

fm_transmit.grc

Audio source comes in from the microphone

Gotta resample

Should resample before fm-mod?

When I did, the signal looked better, but deviation from central frequency was way too high. Could low pass, but probably not the way to go

More to come probably