mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2024-11-14 21:58:44 +08:00
3b2fee43ea
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
26 KiB
26 KiB
qqjd]Zm<5A>tmj`Zmǚwmj`]t<>wmj`]t<>wqjg`t<>wqjg`w<>~tmj`w<>{tmj`w<>~tmjd{<7B>~wmjg{<7B>~wmjg~<7E><>qjg{<7B><>qjg~<7E><>qjj~<7E><>tmj~<7E><>qmg<6D><67>{tmj~<7E><>tmj<6D><6A>{tmj<6D><6A>~tqj<71><6A>~tqj<71><6A>~wqj<71><6A>~tmj<6D><6A>~wqj<71><6A>~wqj<71><6A>~wqj<71><6A><EFBFBD>qm<71><6D>~wqj<71><6A>~wqm<71><6D>~wqm<71><6D><EFBFBD>qj<71><6A><EFBFBD>tm<74><6D><EFBFBD>qj<71><6A><EFBFBD>tm<74><6D><EFBFBD>tm<74><6D><EFBFBD>tm<74><6D><EFBFBD>tm<74><6D>~wtm<74><6D><EFBFBD>tm<74><6D><EFBFBD>tj<74><6A><EFBFBD>tm<74><6D><EFBFBD>tm<74><6D><EFBFBD>tm<74><6D><EFBFBD>tm<74><6D><EFBFBD>tm<74><6D><EFBFBD>tm<74><6D><EFBFBD>tm<74><6D><EFBFBD>tm𢅺<6D><F0A285BA>~w霟錧蚘羹<E89A98><E7BEB9><EFBFBD><EFBFBD><EFBFBD>㺨<EFBFBD><E3BAA8><EFBFBD><EFBFBD><EFBFBD>欘貏<E6AC98>𥡗錆硞郥錧蚘羅奩蚙撰砲怛懦洽<E687A6>鮝僧<E9AE9D><E583A7>㺩釧<E3BAA9><E987A7>㺩釧<E3BAA9><E987A7>㺩釧<E3BAA9><E987A7>尐釧<E5B090><E987A7>尐釧<E5B090><E987A7>㺩釧<E3BAA9><E987A7>鈫釧<E988AB><E987A7>鈫洽<E988AB><E6B4BD>𦅚洽<F0A6859A><E6B4BD>𣺿<EFBFBD><F0A3BABF><EFBFBD>墙<EFBFBD><E5A299><EFBFBD>箲<EFBFBD><E7AEB2><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>~w<><77><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>~w<><77><EFBFBD>~w<><77><EFBFBD>~t<><74><EFBFBD>~t<><74><EFBFBD>{t<><74><EFBFBD>{t<><74><EFBFBD>{t<><74><EFBFBD>{t~<7E><>~wt<77><74>ǚ{q~<7E><>~wq~<7E><>~{t~<7E><>~wq~<7E><>~wq~<7E><>~wq~<7E><>~wq~<7E><>~wq~<7E><>{wm~<7E><>{tm~<7E><>~tq{<7B><>{tm~<7E><>{tm~<7E><>{tm{<7B><>{tm~<7E><>~wm{<7B><>{tm{<7B><>{tq{<7B><>{tm{<7B><>{tm~<7E><>{tm{<7B><>{tm~<7E><>{tm{<7B><>{tm{<7B><>{tm~<7E><>{tm{<7B><>wqm{<7B><>{tm{<7B><>{tmw<6D><77>wqmj{qj`ZSPIMF<62/,(2,%,%,6/,"CMC96/,(Z]VPF?<6jqj]VPMFtwqg`ZSPw<50>jg`ZSw<53>mj`]Vt<56>mg`ZVw<56>qj`]Vt<56>mj`ZVw<56>qj`]V{<7B>tjd`Z{<7B>tjg]Z<><5A>mjd]<5D><>qj`]<5D><>qjg`<60><>tjg`<60><>tmg`<60><>tmj`<60><>tmj`<60>ǚwmjg<6A><67>wqjg<6A><67>wqjg<6A><67>{qjj<6A><6A>wqjg<6A><67>{tmg<6D><67>{tmg叚<67><E58F9A>wq嚭諕陊戴<E9998A><E688B4><EFBFBD><EFBFBD><EFBFBD>帮<EFBFBD><E5B8AE><EFBFBD><EFBFBD>帮鍕<E5B8AE>芇骱蚘匎駂芢撰歐芤像岷怖像<E68096><E5838F>獏釧<E78D8F><E987A7>畺砭<E795BA><E7A0AD>畺洽<E795BA><E6B4BD>畺砲<E795BA><E7A0B2>Ⅰ砲<E285A0><E7A0B2>Ⅰ釧<E285A0><E987A7>Ⅰ砲<E285A0><E7A0B2>畺洛<E795BA><E6B49B>櫊砭<E6AB8A><E7A0AD>裵<EFBFBD><E8A3B5><EFBFBD>裵<EFBFBD><E8A3B5><EFBFBD>糓<EFBFBD><E7B393><EFBFBD>𨧹<EFBFBD><F0A8A7B9><EFBFBD>𨯵<EFBFBD><F0A8AFB5><EFBFBD>俥<EFBFBD><E4BFA5><EFBFBD>俥<EFBFBD><E4BFA5><EFBFBD>偬<EFBFBD><E581AC>~w焵<77><E784B5>~w焵<77><E784B5>~w焵<77><E784B5>{t焵<74><E784B5>~t𥅾<74><F0A585BE>{t𥅾<74><F0A585BE>wt𥅾<74><F0A585BE>{t<><74><EFBFBD>tmm~tjd]ZSPMC<62/,(/,""/,"6<6/(%PPM?962/ddZSIF?<qqj`ZSPFw{qj`]VP{~tjd]ZS{<7B>qj`]Vw<56>mg`]V{<7B>mg`]V{<7B>mj`]V{<7B>mj`]V<>{qjd]Z<>~qjg]Z<>~tmj`]<5D><>qjd]<5D><>qjg]<5D><>tjj`<60><>qjj`<60><>tmg`<60><>tmjd<6A>ǚtqjd<6A><64>wqjg<6A>ǚtqjd<6A><64>wqjg<6A><67>wqjg<6A><67>wqmj<6D><6A>{tmj╰<6A><E295B0>wq欘諕陊戴<E9998A><E688B4><EFBFBD><EFBFBD><EFBFBD>帮<EFBFBD><E5B8AE><EFBFBD><EFBFBD>帮錆<E5B8AE>褀誾訧郩骱陊戴蹼陏像洽紜撲岷<E692B2>彼隆<E5BDBC><E99A86>往砲<E5BE80><E7A0B2>旦砭<E697A6><E7A0AD>牲砲<E789B2><E7A0B2>牲砲<E789B2><E7A0B2>往砲<E5BE80><E7A0B2>牲砲<E789B2><E7A0B2>旦洽<E697A6><E6B4BD>旦洽<E697A6><E6B4BD>4洽<EFBC94><E6B4BD>𨺗<EFBFBD><F0A8BA97><EFBFBD>隁<EFBFBD><E99A81><EFBFBD>隁<EFBFBD><E99A81><EFBFBD>钟<EFBFBD><E9929F><EFBFBD>𩅛<EFBFBD><F0A9859B><EFBFBD>𧋦<EFBFBD><F0A78BA6><EFBFBD>𩅛<EFBFBD><F0A9859B><EFBFBD>𡾞<EFBFBD><F0A1BE9E>~w𢅺<77><F0A285BA>~{襔<><E8A594>{w𡾞<77><F0A1BE9E>{t𡾞<74><F0A1BE9E>{t裦<74><E8A3A6>{t坾<74><E59DBE>{t儍<74><E5848D>wqq~wjd]ZSPPF<62/,,/(",2,"<96/,"VPI?96/,jd]SMF?<wqj`ZPPF<50>tj`]VP<56>tjd]ZS<5A>wmg]]S<>wmg`ZS<5A>wmg`ZS<5A>wmg`]V<>wmg`ZV<5A>{qjd]Z<>~tjg]Z<>~tmg`]<5D><>qjg]<5D><>qjd]<5D><>qjg`<60><>tjg`<60><>tmg`<60>ǚtmjg<6A>ǚtmjd<6A><64>wqjg<6A><67>wqjg<6A><67>wqjg<6A><67>{tmj<6D><6A>{tmj<6D><6A>{tmj<6D><6A><EFBFBD>wq囔骱芢撕<E88AA2><E69295><EFBFBD><EFBFBD><EFBFBD>帮<EFBFBD><E5B8AE><EFBFBD><EFBFBD>帮錆<E5B8AE>帮諕蚐搿骱陊撕ヽ陏像洽嘟撰岷<E692B0>紡釧<E7B4A1><E987A7>笆砲<E7AC86><E7A0B2>笆砭<E7AC86><E7A0AD>章砲<E7ABA0><E7A0B2>飪砲<E9A3AA><E7A0B2>章野<E7ABA0><E9878E>章砲<E7ABA0><E7A0B2>笆砭<E7AC86><E7A0AD>笆洽<E7AC86><E6B4BD>炮<EFBFBD><E782AE><EFBFBD>底<EFBFBD><E5BA95><EFBFBD>底<EFBFBD><E5BA95><EFBFBD>弁<EFBFBD><E5BC81><EFBFBD>布<EFBFBD><E5B883><EFBFBD>╱<EFBFBD><E295B1><EFBFBD>畆<EFBFBD><E79586>~w╱<77><E295B1>~w畆<77><E79586>~w畆<77><E79586>~w畆<77><E79586>~w䰻<77><E4B0BB>{t畆<74><E79586>{t㱔<74><E3B194>{t䰻<74><E4B0BB>{t𣫺<74><F0A3ABBA>wqq~tjd]ZSPPF<62/,,/,"//,%C96/,%"ZPI?962/mg]SPFC<wqj`ZSPI<50>qj`]VP<56>tmg]ZS<5A>wjg`ZS<5A>wmg`]V<>tmg`ZS<5A>wmg`]V<>wmg`]V<>{qjd]Z<>~tjd`Z<>~tmg`]<5D><>qjd]<5D><>qjd`<60><>qjg`<60><>tmj`<60><>tmj`<60>ǚwmjd<6A>ǚtmjd<6A>ǚwqjd<6A><64>wqjg<6A><67>wqjd<6A><64>{qmj<6D><6A>wqmg<6D><67>{qjg洽<67><E6B4BD>wq芇骱陊撰<E9998A><E692B0><EFBFBD><EFBFBD><EFBFBD>幺<EFBFBD><E5B9BA><EFBFBD><EFBFBD>帮錆<E5B8AE><E98C86>芇諕蚘鋋駂陊戴倵陏僖岷曙撲洽<E692B2>飲釧<E9A3B2><E987A7>凳砭<E587B3><E7A0AD>凳砭<E587B3><E7A0AD>凳洽<E587B3><E6B4BD>凳砲<E587B3><E7A0B2>凳砭<E587B3><E7A0AD>凳砲<E587B3><E7A0B2>凳洽<E587B3><E6B4BD>雀<EFBFBD><E99B80><EFBFBD>雀<EFBFBD><E99B80><EFBFBD>秦<EFBFBD><E7A7A6><EFBFBD>秤<EFBFBD><E7A7A4><EFBFBD>秤<EFBFBD><E7A7A4><EFBFBD>洵<EFBFBD><E6B4B5><EFBFBD>炫<EFBFBD><E782AB><EFBFBD>帕<EFBFBD><E5B895>~w洵<77><E6B4B5><EFBFBD>帘<EFBFBD><E5B898>~w巧<77><E5B7A7>~w帘<77><E5B898>~t孕<74><E5AD95>{t孕<74><E5AD95>{t孕<74><E5AD95>{t孕<74><E5AD95>wt╰<74><E295B0>wqw{tjd]VSPPC<6//,,/("2/("F<6/,%"ZPF?92/,qd]PMF?9~qj`ZSPF<50>qj`ZSP𠸑wmg`]Sǚtjd`ZS<5A>wmg`ZS<5A>wmg]]S<>wmg`]V<>{qj`]V<>{qj`]Z<>~tjg`]<5D>~tmj`]<5D><>mjd]<5D><>qjg`<60><>qjg`<60><>tmj`<60><>tmjd<6A><64>tmj`<60><>wmjd<6A>ǚtmjd<6A><64>wqjg<6A><67>wqjg<6A><67>wqjg<6A><67>wqmj<6D><6A>{qmg砭<67><E7A0AD>wt褀骱陊撕<E9998A><E69295><EFBFBD><EFBFBD><EFBFBD>帮<EFBFBD><E5B8AE><EFBFBD><EFBFBD>褀鍕<E8A480><E98D95>芇骱蚘嚭諕陊戴跂芤僖洽勹撲岷<E692B2>撮釧<E692AE><E987A7>撕砭<E69295><E7A0AD>撕砲<E69295><E7A0B2>撕砲<E69295><E7A0B2>羅砲<E7BE85><E7A0B2>羅砲<E7BE85><E7A0B2>撕砭<E69295><E7A0AD>撕砭<E69295><E7A0AD>僎<EFBFBD><E5838E><EFBFBD>僎<EFBFBD><E5838E><EFBFBD>像<EFBFBD><E5838F><EFBFBD>雄<EFBFBD><E99B84><EFBFBD>陳<EFBFBD><E999B3><EFBFBD>閉<EFBFBD><E99689><EFBFBD>閉<EFBFBD><E99689><EFBFBD>祟<EFBFBD><E7A59F>~w祟<77><E7A59F>~w祟<77><E7A59F>~{洛<><E6B49B>{w洸<77><E6B4B8>~t岩<74><E5B2A9>{w岩<77>ǚ{t洛<74><E6B49B>{t失<74>ǚ{t<><74><EFBFBD>wq{~tj`]ZSPIC<6//,//,"6/("I<6/,%]PM?96/,qd]SMCC9<43>j`]SPIòqg`ZSP糎wmg]ZS<5A>wmg]ZS𠸑wmg`]S<>wmg`ZV<5A>wmg`]V<>{qj`]Z<>{qj`]V<>~tjd`Z<>~wmj`]<5D><>qjd]<5D><>qjg]<5D><>qjg]<5D><>tmg`<60><>tmj`<60><>tmj`<60>ǚwqjd<6A><64>tqjg<6A><67>wqmg<6D><67>wqjg<6A><67>wqmg<6D><67>{tqj<71><6A>{tmj砭<6A><E7A0AD>{t褀駂陊戴<E9998A><E688B4><EFBFBD><EFBFBD><EFBFBD>欘<EFBFBD><E6AC98><EFBFBD><EFBFBD>帮鍕<E5B8AE><E98D95>芇骱蚘鐕駂陊戴楈芤像洛岊像<E5B28A><E5838F>ⅷ隄<E285B7><E99A84>羅砭<E7BE85><E7A0AD>羅砲<E7BE85><E7A0B2>羅砲<E7BE85><E7A0B2>ⅴ砲<E285B4><E7A0B2>ⅷ野<E285B7><E9878E>羅野<E7BE85><E9878E>ⅴ砲<E285B4><E7A0B2>羅洽<E7BE85><E6B4BD>撰<EFBFBD><E692B0><EFBFBD>撲<EFBFBD><E692B2><EFBFBD>像<EFBFBD><E5838F><EFBFBD>僖<EFBFBD><E58396><EFBFBD>僧<EFBFBD><E583A7><EFBFBD>僧<EFBFBD><E583A7><EFBFBD>隄<EFBFBD><E99A84><EFBFBD>隆<EFBFBD><E99A86>~w隄<77><E99A84>~w釧<77><E987A7>~w野<77><E9878E>{t釧<74><E987A7>~t砲<74><E7A0B2>{t砲<74><E7A0B2>{t洛<74><E6B49B>{t洽<74><E6B4BD>wq<77>tjg]ZSPPC<62/,2/,"6/,"F<6/,%"]SM?962/md]SMF?9<>j`ZVPIùqj`]ZP𠸑tmg`ZS<5A>wmg`]V𠸑wmg`ZV<5A>wmg`]V<>wmg`]V<>{qjd]Z<>{qjd]Z<>{qjg`Z<>~tmgd]<5D><>mj`]<5D><>qjg`<60><>tjg`<60><>tjg`<60><>tmjd<6A><64>tmjd<6A>ǚwqjg<6A>ǚwqjg<6A>ǚwqjg<6A><67>wtmj<6D><6A>wqmg<6D><67>{qjg<6A><67>{tmj砭<6A><E7A0AD>wq褀諕蚙戴<E89A99><E688B4><EFBFBD><EFBFBD><EFBFBD>帮<EFBFBD><E5B8AE><EFBFBD><EFBFBD>褀鍱<E8A480><E98DB1>芇諕蚘芇駂陊懦骱陊像洽陊像<E9998A><E5838F>宎隆<E5AE8E><E99A86>ⅴ砲<E285B4><E7A0B2>ⅴ砭<E285B4><E7A0AD>ⅴ砲<E285B4><E7A0B2>ⅴ砲<E285B4><E7A0B2>ⅷ祟<E285B7><E7A59F>ⅴ砲<E285B4><E7A0B2>ⅴ砭<E285B4><E7A0AD>羅洽<E7BE85><E6B4BD>應<EFBFBD><E68789><EFBFBD>應<EFBFBD><E68789><EFBFBD>僖<EFBFBD><E58396><EFBFBD>僖<EFBFBD><E58396><EFBFBD>僖<EFBFBD><E58396><EFBFBD>隆<EFBFBD><E99A86><EFBFBD>僧<EFBFBD><E583A7><EFBFBD>隆<EFBFBD><E99A86>~{隆<><E99A86>~w隆<77><E99A86>~w野<77><E9878E>~t鼎<74><E9BC8E>~w野<77><E9878E>{t野<74><E9878E>{t階<74><E99A8E>{t<><74><EFBFBD>tq<74>tjg]ZSPMC<62/,6/("</,"F96/("