kopia lustrzana https://github.com/cariboulabs/cariboulite
example file cleaning
rodzic
007be86e52
commit
41c9e0f50a
|
@ -0,0 +1,7 @@
|
|||
# CaribouLite Examples
|
||||
This folder contains examples categorized by programming languages:
|
||||
- `cpp` - C/C++ examples
|
||||
- `python` - python applets and example
|
||||
|
||||
# License
|
||||
<a rel="license" href="http://creativecommons.org/licenses/by/4.0/"><img alt="Creative Commons License" style="border-width:0" src="https://i.creativecommons.org/l/by/4.0/88x31.png" /></a><br />This work is licensed under a <a rel="license" href="http://creativecommons.org/licenses/by/4.0/">Creative Commons Attribution 4.0 International License</a>.
|
|
@ -1,12 +1,19 @@
|
|||
# PySimpleGUI
|
||||
from PySimpleGUI.PySimpleGUI import Canvas, Column
|
||||
import time
|
||||
import numpy as np
|
||||
from PySimpleGUI import Window, WIN_CLOSED, Slider, Button, theme, Text, Radio, Image, InputText, Canvas
|
||||
|
||||
# Numpy
|
||||
import matplotlib.pyplot as plt
|
||||
from matplotlib.backends.backend_tkagg import FigureCanvasTkAgg, NavigationToolbar2Tk
|
||||
import numpy as np
|
||||
from numpy.lib.arraypad import pad
|
||||
|
||||
# System
|
||||
import time
|
||||
|
||||
# Soapy
|
||||
import SoapySDR
|
||||
from SoapySDR import SOAPY_SDR_RX, SOAPY_SDR_TX, SOAPY_SDR_CS16
|
||||
from PySimpleGUI import Window, WIN_CLOSED, Slider, Button, theme, Text, Radio, Image, InputText, Canvas
|
||||
from numpy.lib.arraypad import pad
|
||||
|
||||
##
|
||||
## WINDOW FUNCTIONS
|
||||
|
@ -115,7 +122,8 @@ def update_est_graphs(window, freq_diff, g_vec, phi_vec, rssi_vec):
|
|||
draw_figure_with_toolbar(window['params_cv'].TKCanvas, fig, window['controls_params_cv'].TKCanvas)
|
||||
|
||||
##
|
||||
## I/Q Correction Functions
|
||||
## I/Q Correction Function - Blind correction
|
||||
|
||||
def fix_iq_blind(x):
|
||||
z = x - np.mean(x)
|
||||
p_in = np.var(z)
|
||||
|
@ -134,6 +142,8 @@ def fix_iq_blind(x):
|
|||
|
||||
return (z_out, g, phi, p_in, c1, c2)
|
||||
|
||||
##
|
||||
## I/Q Correction Function - single tone correction
|
||||
|
||||
def fix_iq_imbalance(x):
|
||||
# remove DC and save input power
|
|
@ -1,12 +1,19 @@
|
|||
# PySimpleGUI
|
||||
from PySimpleGUI.PySimpleGUI import Canvas, Column
|
||||
import time
|
||||
import numpy as np
|
||||
from PySimpleGUI import Window, WIN_CLOSED, Slider, Button, theme, Text, Radio, Image, InputText, Canvas
|
||||
|
||||
# Numpy
|
||||
import matplotlib.pyplot as plt
|
||||
from matplotlib.backends.backend_tkagg import FigureCanvasTkAgg, NavigationToolbar2Tk
|
||||
import numpy as np
|
||||
from numpy.lib.arraypad import pad
|
||||
|
||||
# System
|
||||
import time
|
||||
|
||||
# Soapy
|
||||
import SoapySDR
|
||||
from SoapySDR import SOAPY_SDR_RX, SOAPY_SDR_TX, SOAPY_SDR_CS16
|
||||
from PySimpleGUI import Window, WIN_CLOSED, Slider, Button, theme, Text, Radio, Image, InputText, Canvas
|
||||
from numpy.lib.arraypad import pad
|
||||
|
||||
|
||||
def setup_receiver(sdr, channel, freq_hz):
|
||||
|
@ -23,6 +30,10 @@ def update_receiver_freq(sdr, stream, channel, freq_hz):
|
|||
sdr.setFrequency(SOAPY_SDR_RX, channel, freq_hz)
|
||||
|
||||
|
||||
##
|
||||
## GLOBAL AREA
|
||||
##
|
||||
|
||||
# Data and Source Configuration
|
||||
rx_chan = 0 # 6G = 1
|
||||
N = 16384 # Number of complex samples per transfer
|
|
@ -1,2 +0,0 @@
|
|||
a = 5
|
||||
print("Hello, World ", a)
|
|
@ -1,8 +0,0 @@
|
|||
import numpy as np
|
||||
import matplotlib.pyplot as plt
|
||||
|
||||
#a = np.arange(15).reshape(3,5)
|
||||
a = np.arange(15)
|
||||
plt.plot(a, np.sin(a))
|
||||
plt.ylabel('some numbers')
|
||||
plt.show()
|
|
@ -27,7 +27,7 @@ module top(
|
|||
input i_iq_rx_clk_p, // Paired with i_iq_rx_clk_n - only the 'B' pins need to be specified
|
||||
|
||||
// Note: The icestorm (specifically nextpnr) fails to build if both diff pins are constrained
|
||||
// in the constrain file and the interface herein. Thus we need to take the out so that
|
||||
// in the constrain file and the interface herein. Thus we need to take them out so that
|
||||
// it will "understand" we actually want an LVDS pair inputs. In addition, the pair is
|
||||
// defined only by the "B" pins in BANK3 and not the "A" pins (which is counter-logical)
|
||||
|
||||
|
@ -294,7 +294,7 @@ module top(
|
|||
.empty_o (w_rx_09_fifo_empty)
|
||||
);
|
||||
|
||||
/*lvds_rx lvds_rx_24_inst
|
||||
lvds_rx lvds_rx_24_inst
|
||||
(
|
||||
.i_reset (w_soft_reset),
|
||||
.i_ddr_clk (lvds_clock_buf),
|
||||
|
@ -328,7 +328,7 @@ module top(
|
|||
.rd_data_o (w_rx_24_fifo_pulled_data),
|
||||
.full_o (w_rx_24_fifo_full),
|
||||
.empty_o (w_rx_24_fifo_empty)
|
||||
);*/
|
||||
);
|
||||
|
||||
smi_ctrl smi_ctrl_ins
|
||||
(
|
||||
|
|
Ładowanie…
Reference in New Issue