差别
这里会显示出您选择的修订版和当前版本之间的差别。
两侧同时换到之前的修订记录 前一修订版 后一修订版 | 前一修订版 | ||
instru_protocol [2021/10/27 09:40] gongyusu |
instru_protocol [2021/10/27 10:36] (当前版本) gongyusu |
||
---|---|---|---|
行 1: | 行 1: | ||
- | ## 仪器用数据传输及控制协议 | + | ## 硬禾仪器用数据传输及控制协议 |
+ | 本逻辑用于将高速ADC采集到的数据进行缓存,并根据上位机的需要,从缓存的数据中选出用于显示的部分进行传输,传输的方式可以是: | ||
+ | * 串口UART | ||
+ | * BLE | ||
+ | * WiFi | ||
+ | * SPI | ||
+ | |||
+ | FPGA的作用负责解析控制器发来的控制字,并根据控制字的内容从缓存中选取需要的数据 | ||
+ | - 由ADC获取的数据或送往DAC的数据:LVDS:250MHz/8bits/4Lanes, 并行:100MHz/14bits | ||
+ | - 需要显示的数据:20帧/秒 * 1KPoints/帧 * 10bit/points = 200kbps | ||
+ | - 存储深度:ADC - 8K * 10bits * 2(通道)= 20KBytes, DAC - 4K * 12bits * 2 = 12KByte,总计32KBytes | ||
+ | |||
+ | 未来在FPGA里面可以扩展的数据处理功能: | ||
+ | - FFT | ||
+ | - 数字滤波 | ||
+ | - 模式识别 | ||
+ | - 机器学习 | ||
- | ### 示波器部分的功能 | ||
FPGA内部的框图如下: | FPGA内部的框图如下: | ||
- | {{drawio>instru_control_data_protocol}} <WRAP centeralign> 数据采集FPGA逻辑功能</WRAP> | + | {{drawio>instru_control_data_protocol}} <WRAP centeralign> 数据采集FPGA逻辑功能</WRAP> |
+ | |||
+ | #### 参考文档: | ||
+ | * [[scope_verilog|基于FPGA逻辑的示波器设计]] | ||
+ | * [[up5k_scope|双通道50Msps/10MHz口袋示波器]] | ||
+ | |||
+ | |||
+ | |||
+ | ### 示波器部分的功能 | ||
主要分为两部分: | 主要分为两部分: | ||
行 17: | 行 41: | ||
### Waveformlive的仪器控制协议参考 | ### Waveformlive的仪器控制协议参考 | ||
- | |||
- | ---- | ||
* 下面的JSON数据已扩展以提高可读性。在传输之前,应将所有JSON缩小(删除空白). | * 下面的JSON数据已扩展以提高可读性。在传输之前,应将所有JSON缩小(删除空白). | ||
* 除非另有说明,否则使用HTTP时,所有命令均使用POST方法发送. | * 除非另有说明,否则使用HTTP时,所有命令均使用POST方法发送. | ||
行 43: | 行 65: | ||
</code> | </code> | ||
- | ## 多命令 | + | #### 多命令 |
---- | ---- | ||
可以使用多命令在单个事务中发送多个命令。 | 可以使用多命令在单个事务中发送多个命令。 | ||
- | ### 举例: | + | ##### 举例: |
<WRAP group> | <WRAP group> | ||
<WRAP half column> | <WRAP half column> | ||
行 106: | 行 128: | ||
- | + | #### 波形发生器部分 | |
- | + | ||
- | ## 波形发生器部分 | + | |
提供访问任意波形发生器的数据和功能的命令 | 提供访问任意波形发生器的数据和功能的命令 | ||
- | ### 获得当前状态 | + | ##### 获得当前状态 |
- | --- | ||
获得仪器通道的当前状态、 | 获得仪器通道的当前状态、 | ||
- | #### 命令 | + | ##### 命令 |
* ** awg ** - (Object) - 任意波形发生器的目标. | * ** awg ** - (Object) - 任意波形发生器的目标. | ||
* ** # ** - (Array<Object>) - An array of command objects to apply to the awg channel. | * ** # ** - (Array<Object>) - An array of command objects to apply to the awg channel. | ||
* ** command ** - (String) - 获取当前状态的命令: “getCurrentState” | * ** command ** - (String) - 获取当前状态的命令: “getCurrentState” | ||
- | #### 响应 | + | ##### 响应 |
* ** awg ** - (Object) - 任意波形发生器的目标 | * ** awg ** - (Object) - 任意波形发生器的目标 | ||
* ** # ** - (Array<Object>) - An array of command objects applied to the awg channel. | * ** # ** - (Array<Object>) - An array of command objects applied to the awg channel. | ||
行 134: | 行 153: | ||
- | #### 例子 | + | ##### 例子 |
<WRAP group> | <WRAP group> | ||
行 176: | 行 195: | ||
- | ### 设置通用波形 | + | ##### 设置通用波形 |
- | ---- | ||
设置AWG的通道参数以输出正常的波形 | 设置AWG的通道参数以输出正常的波形 | ||
- | #### 命令 | + | ##### 命令 |
* **awg** - (Object) - The arbitrary waveform generator object. | * **awg** - (Object) - The arbitrary waveform generator object. | ||
* **#** - (Array<Object>) - An array of command objects to apply to the awg channel. | * **#** - (Array<Object>) - An array of command objects to apply to the awg channel. | ||
行 190: | 行 209: | ||
* **vOffset** - (Integer) - The voltage offset in mV. | * **vOffset** - (Integer) - The voltage offset in mV. | ||
- | #### 响应 | + | ##### 响应 |
* **awg** - (Object) - The arbitrary waveform generator object. | * **awg** - (Object) - The arbitrary waveform generator object. | ||
* **#** - (Array<Object>) - An array of command objects applied to the awg channel. | * **#** - (Array<Object>) - An array of command objects applied to the awg channel. | ||
行 201: | 行 220: | ||
- | #### 举例(波形) | + | ##### 举例(波形) |
--- | --- | ||
行 245: | 行 264: | ||
\\ \\ | \\ \\ | ||
- | ### 运行 | + | ##### 运行 |
- | + | ||
- | ---- | + | |
运行AWG通道 | 运行AWG通道 | ||
- | #### 命令 | + | ##### 命令 |
* **awg** - (Object) - The arbitrary waveform generator object. | * **awg** - (Object) - The arbitrary waveform generator object. | ||
* **#** - (Array<Object>) - An array of command objects to apply to the awg channel. | * **#** - (Array<Object>) - An array of command objects to apply to the awg channel. | ||
* **command** - (String) - The Run command: “run” | * **command** - (String) - The Run command: “run” | ||
- | #### 响应 | + | ##### 响应 |
* **awg** - (Object) - The arbitrary waveform generator object. | * **awg** - (Object) - The arbitrary waveform generator object. | ||
* **#** - (Array<Object>) - An array of command objects applied to the awg channel. | * **#** - (Array<Object>) - An array of command objects applied to the awg channel. | ||
行 300: | 行 317: | ||
\\ | \\ | ||
- | ### 停止 | + | ##### 停止 |
---- | ---- | ||
行 355: | 行 372: | ||
- | ## 直流电压 | + | #### 直流电压 |
提供访问直流电压数据和函数的命令 | 提供访问直流电压数据和函数的命令 | ||
- | ### 获取当前状态 | + | ##### 获取当前状态 |
---- | ---- | ||
行 414: | 行 432: | ||
\\ | \\ | ||
- | ### 获取电压值 | + | ##### 获取电压值 |
---- | ---- | ||
行 421: | 行 439: | ||
#### 命令 | #### 命令 | ||
+ | |||
* **dc** - (Object) - The DC power supply object. | * **dc** - (Object) - The DC power supply object. | ||
* **#** - (Array<Object>) - An array of command objects to apply to the DC power supply channel. | * **#** - (Array<Object>) - An array of command objects to apply to the DC power supply channel. | ||
行 469: | 行 488: | ||
\\ | \\ | ||
- | ### 设置电压 | + | ##### 设置电压 |
---- | ---- | ||
行 482: | 行 501: | ||
#### 响应 | #### 响应 | ||
+ | |||
* **gpio** - (Object) - The DC power supply object. | * **gpio** - (Object) - The DC power supply object. | ||
* **#** - (Array<Object>) - An array of command objects applied to the DC power supply channel. | * **#** - (Array<Object>) - An array of command objects applied to the DC power supply channel. | ||
行 489: | 行 509: | ||
#### 举例: | #### 举例: | ||
+ | |||
<WRAP group> | <WRAP group> | ||
<WRAP half column> | <WRAP half column> |