Summary of this week - Verilog,FMZ+ccxt Quantification, NX Development Environment Configuration Drive Can Bus Method

Week Summary

1. Verilog Learning

Verilog

Verilog, commonly referred to as Verilog HDL, is one of the hardware description languages for digital logic design and the other is generally considered to be VHDL. Verilog can simulate, validate, analyze and synthesize digital logic. It has functions of describing circuit connection, circuit function, describing circuit at different abstract levels, time sequence of circuit, and expressing parallel system. It is one of the most widely used hardware description languages at present.

Verilog's first experimental procedure uses xlinx Go1

Install Vivado Development Environment
slightly

`timescale 1ns / 1ns
//
// Company: 
// Engineer: 
// 
// Create Date: 2017/07/16 22:49:35
// Design Name: 
// Module Name: Flash_led_top_tb
// Project Name: 
// Target Devices: 
// Tool Versions: 
// Description: 
// 
// Dependencies: 
// 
// Revision:
// Revision 0.01 - File Created
// Additional Comments:
// 
//


module flash_led_top_tb;
 	 	reg clk,rst,sw0;
 	 	wire [15:0] led;
 	  	initial begin
 	 		clk = 1'b0;
 	 		rst = 1'b1;
 	 		sw0 = 1'b0;
 	 		#10 rst = 1'b0;
 	 		#10 rst = 1'b1;
 	 		#1000000000 				 // Changing direction of displacement after 3s
 	 		#1000000000
 	 		#1000000000
 	 		sw0 = 1'b1;
 	 	end
 	 	always #5 CLK <= ~clk;// 100MHz Clock
 	 	flash_led_top flash_led_top(
 	 		.clk( clk ),
 	 		.rst_n( rst ),
 	 		.sw0( sw0 ),
 	 		.led( led )
 	 	);
endmodule

2. FMZ+ccxt quantifies week1

CCXT is a JavaScript / Python / PHP library for encrypting electronic transactions of currencies and supports many bitcoin / Ethernet / Shanzhai currency trading API s.
CCXT libraries can be used for connections and transactions on encrypted currency/shanzhai currency exchanges around the world, as well as for transfer payment processing services. It provides quick access to market data for data storage, analysis, visualization, indicator development, algorithm trading, strategy testing, robotics, online store integration, and other related software engineering.

It can be used by programmers, development engineers, skilled traders, data scientists, and financial analysts to build transaction algorithms on top of it.

  1. It can be cloned from the ccxt GitHub repository into the project directory:
  2. Read data from various exchanges through common interface api
git clone https:
//github.com/ccxt/ccxt.git


pip install ccxt

# Initialize exchange

binance_exchange = ccxt.binance({

'timeout'
: 
15000
,

'enableRateLimit'
: 
True

})



# Get ticker data for a single transaction pair

binance_exchange.fetchTicker(symbol)



# Get ticker data for multiple transaction pairs

tickers_data = binance_exchange.fetchTickers([
'BTC/USDT'
, 
'ETH/USDT'
])



# Transaction Delegation Account Data Acquisition

binance_exchange.fetch_order_book(symbol)



# K-line data acquisition

binance_exchange.fetch_ohlcv(symbol, timeframe=
'1d'
)

FMZ
FMZ Inventor Quantification Platform (formerly BotVS) is the most professional quantification community in China, created in 2015. Here you can learn, write, share, buy and sell quantitative strategies, test back online and use simulated disks to simulate transactions, and run, open, and watch real-world robots. Supports commodity futures and easy Sheng foreign exchange futures, as well as almost all common digital currency exchanges. FMZ is suitable for beginners of quantitative trading, even if there is no basis for quick start, powerful and flexible platform, can also meet advanced needs. Welcome to the official QQ group 5 discussion: 863946592, and the WeChat group on the first page.

For digital currency spot exchanges, almost all are currently supported, and if there are other exchanges needed, they will soon be supported. Digital currency futures trading support are: OKEX, Huobi, GateIO, BitMEX, Deribit, BFX; Supported leverage exchanges are OKEX, Huobi, Binance, FCoin, ZB, Bibox; Supported perpetual contract exchanges are: BitMEX, Deribit, GateIO, OKEX, BFX, Bibox; Simulated Exchanges: Testing networks on exchanges such as BitMEX and the official FMZ Spot Simulated Trading Platform wex.app.

The FMZ Quantization Platform supports the use of complete high-level languages such as Javascript, Python, C++, as well as the visualization language and the Mai language (compatible with Mandarin, Chinese and Finance) implementation strategies.

Platform charges per hour, each robot running on a solid disk charges 0.125 yuan per hour, less than one hour charges per hour, restart after pause without duplicate charges, simulation disk is free.

FMZ is better than usage

Development Environment Configuration for NX

This week we got our new xhavier NX kit pictured as a smart box

The personal experience is not as good as the comfort of your own router and notebook on top of the machine. The first time you use the arm architecture, the core won't use many pits and the internal resources are not complete, but it's okay to barely open the hardware peripherals inside


This side has a complete interface
Can signal from stm32 can be received after running receive script
Of course, the official code was temporarily used

```bash
#!/bin/sh
clear Setting parameters
declare -i i=1
str_can0='can0' str_can1='can1' str=' #Load can module
sudo modprobe can
sudo modprobe can_raw
sudo modprobe mttcan
#Enable can0
echo 'Enable can0' #Setting the can0 baud rate to 80k bps
sudo ip link set can0 type can bitrate 80000
#Open can0
sudo ip link set up can0
#Execute candump on can0 receiver, block waiting message, and generate can send and receive information document record
candump can0 2>&1 | tee can0.dump.txt
#Wait 60s
sleep 60
#Close can0
sudo ip link set can0 down
#Sign out
exit

Keywords: Python Machine Learning Embedded system

Added by Dan The Man on Sun, 05 Dec 2021 22:04:36 +0200