Commit graph

7 commits

Author SHA1 Message Date
Alex
3e4b7d07ff Whitespace, formatting 2023-08-24 18:21:07 +02:00
Alex
66b1758278 Removed commented out includes
Include statements in individual files are not required when compiling the code the correct way as a project with an explicitly defined work library. The Makefile exactly replicates the compilation process of the ISE environment and generates the required project files.
2023-08-24 18:06:44 +02:00
d18c7db
c59bdec4f2 Unified fpga folders 2023-05-30 19:47:27 +02:00
Philippe Teuwen
e79fb92074 Add fpga-xc3s100e and icopyx support 2021-08-21 23:45:46 +02:00
Philippe Teuwen
1354aec556 typos 2019-08-06 13:51:10 +02:00
Philippe Teuwen
cb439ef58b style of .v files 2019-07-30 22:51:38 +02:00
iZsh
3b2fee43ea New LF edge detection algorithm + lowpass filter
This is a new LF edge detection algorithm for the FPGA.

- It uses a low-pass IIR filter to clean the signal
(see https://fail0verflow.com/blog/2014/proxmark3-fpga-iir-filter.html)
- The algorithm is able to detect consecutive peaks in the same
  direction
- It uses an envelope follower to dynamically adjust the peak thresholds
- The main threshold used in the envelope follower can be set from the ARM side

fpga/lf_edge_detect.v,
fpga/lp20khz_1MSa_iir_filter.v,
fpga/min_max_tracker.v: New file.

fpga/lo_edge_detect.v, fpga/fpga_lf.v: Modify accordingly.

armsrc/apps.h (FPGA_CMD_SET_USER_BYTE1,
FPGA_CMD_SET_EDGE_DETECT_THRESHOLD): New FPGA command.
fpga/fpga_lf.v: Modify accordingly/Add a 8bit user register.

fpga/fpga_lf.bit: Update accordingly.

fpga/tests: New directory for testbenches

fpga/tests/Makefile: New file. It compiles the testbenches
and runs all the tests by default (comparing with the golden output)

fpga/tests/tb_lp20khz_1MSa_iir_filter.v,
fpga/tests/tb_min_max_tracker.v,
fpga/tests/tb_lf_edge_detect.v: New testbenches

fpga/tests/plot_edgedetect.py: New script to plot the results from
the edge detection tests.

fpga/tests/tb_data: New directory for data and golden outputs
2014-06-27 14:27:03 +02:00