├── FederatedLearningFPGA
├── testbench
│ ├── tb_layer
│ │ ├── tb_hidden_layer.v
│ │ └── tb_input_layer.v
│ ├── tb_alu
│ │ ├── tb_ieee754_natural_exponential.v
│ │ ├── tb_ieee754_to_parts.v
│ │ ├── tb_ieee754_compare.v
│ │ ├── tb_ieee754_multiplier.v
│ │ ├── tb_ieee754_adder.v
│ │ └── tb_ieee754_divider.v
│ ├── tb_miscellaneous
│ │ ├── tb_memory.v
│ │ ├── tb_register.v
│ │ ├── tb_multiplexer_parametrized.v
│ │ └── tb_memory_32bit.v
│ └── tb_neuron
│ │ └── tb_relu.v
├── db
│ ├── NeuralNetworkFPGA.map.logdb
│ ├── NeuralNetworkFPGA.map_bb.logdb
│ ├── NeuralNetworkFPGA.smart_action.txt
│ ├── .cmp.kpt
│ ├── NeuralNetworkFPGA_partition_pins.json
│ ├── NeuralNetworkFPGA.hif
│ ├── NeuralNetworkFPGA.cbx.xml
│ ├── NeuralNetworkFPGA.asm.rdb
│ ├── NeuralNetworkFPGA.cmp.bpm
│ ├── NeuralNetworkFPGA.cmp.cdb
│ ├── NeuralNetworkFPGA.cmp.hdb
│ ├── NeuralNetworkFPGA.cmp.idb
│ ├── NeuralNetworkFPGA.cmp.rdb
│ ├── NeuralNetworkFPGA.lpc.rdb
│ ├── NeuralNetworkFPGA.map.ammdb
│ ├── NeuralNetworkFPGA.map.bpm
│ ├── NeuralNetworkFPGA.map.cdb
│ ├── NeuralNetworkFPGA.map.hdb
│ ├── NeuralNetworkFPGA.map.kpt
│ ├── NeuralNetworkFPGA.map.rdb
│ ├── NeuralNetworkFPGA.pplq.rdb
│ ├── NeuralNetworkFPGA.rtlv.hdb
│ ├── NeuralNetworkFPGA.sgate.nvd
│ ├── NeuralNetworkFPGA.sta.rdb
│ ├── NeuralNetworkFPGA.vpr.ammdb
│ ├── NeuralNetworkFPGA.(0).cnf.cdb
│ ├── NeuralNetworkFPGA.(0).cnf.hdb
│ ├── NeuralNetworkFPGA.(1).cnf.cdb
│ ├── NeuralNetworkFPGA.(1).cnf.hdb
│ ├── NeuralNetworkFPGA.(2).cnf.cdb
│ ├── NeuralNetworkFPGA.(2).cnf.hdb
│ ├── NeuralNetworkFPGA.(3).cnf.cdb
│ ├── NeuralNetworkFPGA.(3).cnf.hdb
│ ├── NeuralNetworkFPGA.(4).cnf.cdb
│ ├── NeuralNetworkFPGA.(4).cnf.hdb
│ ├── NeuralNetworkFPGA.(5).cnf.cdb
│ ├── NeuralNetworkFPGA.(5).cnf.hdb
│ ├── NeuralNetworkFPGA.(6).cnf.cdb
│ ├── NeuralNetworkFPGA.(6).cnf.hdb
│ ├── NeuralNetworkFPGA.(7).cnf.cdb
│ ├── NeuralNetworkFPGA.(7).cnf.hdb
│ ├── NeuralNetworkFPGA.(8).cnf.cdb
│ ├── NeuralNetworkFPGA.(8).cnf.hdb
│ ├── NeuralNetworkFPGA.(9).cnf.cdb
│ ├── NeuralNetworkFPGA.(9).cnf.hdb
│ ├── NeuralNetworkFPGA.map_bb.cdb
│ ├── NeuralNetworkFPGA.map_bb.hdb
│ ├── NeuralNetworkFPGA.pre_map.hdb
│ ├── NeuralNetworkFPGA.routing.rdb
│ ├── NeuralNetworkFPGA.rtlv_sg.cdb
│ ├── NeuralNetworkFPGA.(10).cnf.cdb
│ ├── NeuralNetworkFPGA.(10).cnf.hdb
│ ├── NeuralNetworkFPGA.(11).cnf.cdb
│ ├── NeuralNetworkFPGA.(11).cnf.hdb
│ ├── NeuralNetworkFPGA.(12).cnf.cdb
│ ├── NeuralNetworkFPGA.(12).cnf.hdb
│ ├── NeuralNetworkFPGA.(13).cnf.cdb
│ ├── NeuralNetworkFPGA.(13).cnf.hdb
│ ├── NeuralNetworkFPGA.(14).cnf.cdb
│ ├── NeuralNetworkFPGA.(14).cnf.hdb
│ ├── NeuralNetworkFPGA.(15).cnf.cdb
│ ├── NeuralNetworkFPGA.(15).cnf.hdb
│ ├── NeuralNetworkFPGA.(16).cnf.cdb
│ ├── NeuralNetworkFPGA.(16).cnf.hdb
│ ├── NeuralNetworkFPGA.(17).cnf.cdb
│ ├── NeuralNetworkFPGA.(17).cnf.hdb
│ ├── NeuralNetworkFPGA.(18).cnf.cdb
│ ├── NeuralNetworkFPGA.(18).cnf.hdb
│ ├── NeuralNetworkFPGA.(19).cnf.cdb
│ ├── NeuralNetworkFPGA.(19).cnf.hdb
│ ├── NeuralNetworkFPGA.(20).cnf.cdb
│ ├── NeuralNetworkFPGA.(20).cnf.hdb
│ ├── NeuralNetworkFPGA.(21).cnf.cdb
│ ├── NeuralNetworkFPGA.(21).cnf.hdb
│ ├── NeuralNetworkFPGA.(22).cnf.cdb
│ ├── NeuralNetworkFPGA.(22).cnf.hdb
│ ├── NeuralNetworkFPGA.(23).cnf.cdb
│ ├── NeuralNetworkFPGA.(23).cnf.hdb
│ ├── NeuralNetworkFPGA.(24).cnf.cdb
│ ├── NeuralNetworkFPGA.(24).cnf.hdb
│ ├── NeuralNetworkFPGA.(25).cnf.cdb
│ ├── NeuralNetworkFPGA.(25).cnf.hdb
│ ├── NeuralNetworkFPGA.(26).cnf.cdb
│ ├── NeuralNetworkFPGA.(26).cnf.hdb
│ ├── NeuralNetworkFPGA.(27).cnf.cdb
│ ├── NeuralNetworkFPGA.(27).cnf.hdb
│ ├── NeuralNetworkFPGA.asm_labs.ddb
│ ├── NeuralNetworkFPGA.atom_fit.nvd
│ ├── NeuralNetworkFPGA.atom_map.nvd
│ ├── NeuralNetworkFPGA.cmp_merge.kpt
│ ├── NeuralNetworkFPGA.sgate_sm.nvd
│ ├── NeuralNetworkFPGA.rtlv_sg_swap.cdb
│ ├── NeuralNetworkFPGA.sgate_sm_bdd.nvd
│ ├── NeuralNetworkFPGA.tis_db_list.ddb
│ ├── NeuralNetworkFPGA.sld_design_entry.sci
│ ├── NeuralNetworkFPGA.db_info
│ ├── NeuralNetworkFPGA.sld_design_entry_dsc.sci
│ ├── NeuralNetworkFPGA.tiscmp.fast_1200mv_0c.ddb
│ ├── NeuralNetworkFPGA.tiscmp.slow_1200mv_0c.ddb
│ ├── NeuralNetworkFPGA.tiscmp.slow_1200mv_85c.ddb
│ ├── NeuralNetworkFPGA.root_partition.map.reg_db.cdb
│ ├── NeuralNetworkFPGA.sta_cmp.7_slow_1200mv_85c.tdb
│ ├── NeuralNetworkFPGA.cycloneive_io_sim_cache.45um_ff_1200mv_0c_fast.hsd
│ ├── NeuralNetworkFPGA.cycloneive_io_sim_cache.45um_ii_1200mv_0c_slow.hsd
│ ├── NeuralNetworkFPGA.cycloneive_io_sim_cache.45um_ii_1200mv_85c_slow.hsd
│ ├── NeuralNetworkFPGA.tmw_info
│ ├── NeuralNetworkFPGA.npp.qmsg
│ ├── NeuralNetworkFPGA.asm.qmsg
│ ├── NeuralNetworkFPGA.eda.qmsg
│ └── NeuralNetworkFPGA.smp_dump.txt
├── output_files
│ ├── NeuralNetworkFPGA.sld
│ ├── NeuralNetworkFPGA.done
│ ├── NeuralNetworkFPGA.sof
│ ├── NeuralNetworkFPGA.fit.rpt
│ ├── NeuralNetworkFPGA.sta.summary
│ ├── NeuralNetworkFPGA.map.smsg
│ ├── NeuralNetworkFPGA.jdi
│ ├── Processor.v.bak
│ ├── NeuralNetworkFPGA.cdf
│ ├── NeuralNetworkFPGA.map.summary
│ ├── NeuralNetworkFPGA.fit.summary
│ ├── NeuralNetworkFPGA.fit.smsg
│ └── NeuralNetworkFPGA.asm.rpt
├── incremental_db
│ ├── compiled_partitions
│ │ ├── NeuralNetworkFPGA.root_partition.cmp.logdb
│ │ ├── NeuralNetworkFPGA.root_partition.map.hbdb.sig
│ │ ├── NeuralNetworkFPGA.rrp.hdb
│ │ ├── NeuralNetworkFPGA.db_info
│ │ ├── NeuralNetworkFPGA.root_partition.cmp.cdb
│ │ ├── NeuralNetworkFPGA.root_partition.cmp.dfp
│ │ ├── NeuralNetworkFPGA.root_partition.cmp.hdb
│ │ ├── NeuralNetworkFPGA.root_partition.map.cdb
│ │ ├── NeuralNetworkFPGA.root_partition.map.dpi
│ │ ├── NeuralNetworkFPGA.root_partition.map.hdb
│ │ ├── NeuralNetworkFPGA.root_partition.map.kpt
│ │ ├── NeuralNetworkFPGA.root_partition.cmp.ammdb
│ │ ├── NeuralNetworkFPGA.root_partition.cmp.rcfdb
│ │ ├── NeuralNetworkFPGA.root_partition.map.hbdb.cdb
│ │ ├── NeuralNetworkFPGA.root_partition.map.hbdb.hdb
│ │ └── NeuralNetworkFPGA.root_partition.map.hbdb.hb_info
│ └── README
├── simulation
│ └── questa
│ │ ├── NeuralNetworkFPGA.sft
│ │ ├── NeuralNetworkFPGA_run_msim_gate_verilog.do
│ │ ├── NeuralNetworkFPGA_run_msim_gate_verilog.do.bak
│ │ ├── NeuralNetworkFPGA_run_msim_rtl_verilog.do
│ │ └── NeuralNetworkFPGA_run_msim_rtl_verilog.do.bak
├── .qsys_edit
│ ├── filters.xml
│ └── preferences.xml
├── NeuralNetworkFPGA.qws
├── NeuralNetworkFPGA.v.bak
├── Readme
├── NeuralNetworkFPGA_nativelink_simulation.rpt
├── test_adder.v
├── ieee745ALU.v.bak
├── NeuralNetworkFPGA.qpf
├── memory_32bit.v
├── miscellaneous.v
├── z_module_analysis.py
├── NeuralNetworkFPGA.qsf
└── layer.v
├── DeepLearning
├── main
├── dataset
│ ├── spliter
│ ├── converter
│ ├── normalizer
│ ├── winetocsv
│ ├── iris
│ │ ├── database.sqlite
│ │ ├── datasetevaluation.csv
│ │ ├── datasettraining.csv
│ │ └── Iris.csv
│ ├── wine
│ │ ├── Index
│ │ ├── datasetevaluation.csv
│ │ ├── wine.names
│ │ └── datasetevaluationnormalized.csv
│ ├── glass
│ │ ├── Index
│ │ ├── glass.tag
│ │ ├── glass.names
│ │ └── datasetevaluation.csv
│ ├── datasetcsvonehot.c
│ ├── datasetnormalization.c
│ ├── datasetspliter.c
│ └── winetocsv.c
├── .gitignore
├── Makefile
└── federatedlearning.h
├── ProjectImages
├── struct.png
├── systemflow.png
└── hardwaresetup.png
├── CP210X driver
├── Windows
│ ├── slabvcp.cat
│ ├── x64
│ │ ├── silabser.sys
│ │ ├── WdfCoInstaller01009.dll
│ │ └── WdfCoInstaller01011.dll
│ ├── x86
│ │ ├── silabser.sys
│ │ ├── WdfCoInstaller01009.dll
│ │ └── WdfCoInstaller01011.dll
│ ├── CP210xVCPInstaller_x64.exe
│ └── CP210xVCPInstaller_x86.exe
└── Linux
│ ├── Linux_2.6.x_VCP_Driver_Source
│ ├── Makefile
│ ├── CP210x_VCP_Linux_2.6.x_Release_Notes.txt
│ └── cp210x_gpio_example.c
│ └── Linux_3.x.x_VCP_Driver_Source
│ ├── Makefile
│ ├── cp210x_gpio_example.c
│ └── CP210x_VCP_Linux_3.13.x_Release_Notes.txt
├── FederatedLearningServer
├── lib
│ ├── websocketserver.h
│ ├── httpserver.h
│ ├── websockethandlers.h
│ ├── JSONConverter.h
│ ├── httphandlers.h
│ └── federatedlearning.h
├── README.md
├── static
│ └── index.html
├── datasetevaluation.csv
├── data
│ └── datasetevaluation.csv
├── Makefile
├── src
│ ├── websockethandlers.c
│ └── httpserver.c
├── main.c
└── fedlearning.json
├── FederatedLearningESP32
├── components
│ ├── websocket
│ │ ├── websocketclient.h
│ │ ├── CMakeLists.txt
│ │ └── websocketclient.c
│ ├── cJSON
│ │ ├── JSONConverter.h
│ │ └── CMakeLists.txt
│ ├── federatedlearning
│ │ ├── CMakeLists.txt
│ │ └── federatedlearning.h
│ ├── http
│ │ ├── CMakeLists.txt
│ │ └── httpclient.h
│ ├── README
│ └── espwebsocketclient
│ │ └── CMakeLists.txt
├── main
│ ├── CMakeLists.txt
│ ├── espconfiguration.h
│ ├── main.c
│ └── espconfiguration.c
├── partitions.csv
├── CMakeLists.txt
├── data
│ ├── dataset1.csv
│ ├── dataset2.csv
│ ├── dataset3.csv
│ └── dataset.csv
└── README.md
└── .gitignore
/FederatedLearningFPGA/testbench/tb_layer/tb_hidden_layer.v:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/FederatedLearningFPGA/testbench/tb_layer/tb_input_layer.v:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/FederatedLearningFPGA/db/NeuralNetworkFPGA.map.logdb:
--------------------------------------------------------------------------------
1 | v1
2 |
--------------------------------------------------------------------------------
/FederatedLearningFPGA/db/NeuralNetworkFPGA.map_bb.logdb:
--------------------------------------------------------------------------------
1 | v1
2 |
--------------------------------------------------------------------------------
/FederatedLearningFPGA/db/NeuralNetworkFPGA.smart_action.txt:
--------------------------------------------------------------------------------
1 | DONE
2 |
--------------------------------------------------------------------------------
/FederatedLearningFPGA/output_files/NeuralNetworkFPGA.sld:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/FederatedLearningFPGA/output_files/NeuralNetworkFPGA.done:
--------------------------------------------------------------------------------
1 | Fri Dec 13 02:14:08 2024
2 |
--------------------------------------------------------------------------------
/DeepLearning/main:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/GitScrider/FederatedEdgeComputing/HEAD/DeepLearning/main
--------------------------------------------------------------------------------
/FederatedLearningFPGA/incremental_db/compiled_partitions/NeuralNetworkFPGA.root_partition.cmp.logdb:
--------------------------------------------------------------------------------
1 | v1
2 |
--------------------------------------------------------------------------------
/FederatedLearningFPGA/simulation/questa/NeuralNetworkFPGA.sft:
--------------------------------------------------------------------------------
1 | set tool_name "Questa Intel FPGA (Verilog)"
2 |
--------------------------------------------------------------------------------
/FederatedLearningFPGA/.qsys_edit/filters.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
--------------------------------------------------------------------------------
/ProjectImages/struct.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/GitScrider/FederatedEdgeComputing/HEAD/ProjectImages/struct.png
--------------------------------------------------------------------------------
/DeepLearning/dataset/spliter:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/GitScrider/FederatedEdgeComputing/HEAD/DeepLearning/dataset/spliter
--------------------------------------------------------------------------------
/ProjectImages/systemflow.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/GitScrider/FederatedEdgeComputing/HEAD/ProjectImages/systemflow.png
--------------------------------------------------------------------------------
/DeepLearning/dataset/converter:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/GitScrider/FederatedEdgeComputing/HEAD/DeepLearning/dataset/converter
--------------------------------------------------------------------------------
/DeepLearning/dataset/normalizer:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/GitScrider/FederatedEdgeComputing/HEAD/DeepLearning/dataset/normalizer
--------------------------------------------------------------------------------
/DeepLearning/dataset/winetocsv:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/GitScrider/FederatedEdgeComputing/HEAD/DeepLearning/dataset/winetocsv
--------------------------------------------------------------------------------
/ProjectImages/hardwaresetup.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/GitScrider/FederatedEdgeComputing/HEAD/ProjectImages/hardwaresetup.png
--------------------------------------------------------------------------------
/CP210X driver/Windows/slabvcp.cat:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/GitScrider/FederatedEdgeComputing/HEAD/CP210X driver/Windows/slabvcp.cat
--------------------------------------------------------------------------------
/FederatedLearningFPGA/db/.cmp.kpt:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/GitScrider/FederatedEdgeComputing/HEAD/FederatedLearningFPGA/db/.cmp.kpt
--------------------------------------------------------------------------------
/FederatedLearningFPGA/incremental_db/compiled_partitions/NeuralNetworkFPGA.root_partition.map.hbdb.sig:
--------------------------------------------------------------------------------
1 | c5eb7f6cdd530884c3b884e0a3668ea4
--------------------------------------------------------------------------------
/DeepLearning/.gitignore:
--------------------------------------------------------------------------------
1 | main
2 | main.exe
3 | dataset.exe
4 | dataset/converter
5 | dataset/normalizer
6 | dataset/spliter
7 | dataset/winetocsv
--------------------------------------------------------------------------------
/CP210X driver/Windows/x64/silabser.sys:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/GitScrider/FederatedEdgeComputing/HEAD/CP210X driver/Windows/x64/silabser.sys
--------------------------------------------------------------------------------
/CP210X driver/Windows/x86/silabser.sys:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/GitScrider/FederatedEdgeComputing/HEAD/CP210X driver/Windows/x86/silabser.sys
--------------------------------------------------------------------------------
/DeepLearning/dataset/iris/database.sqlite:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/GitScrider/FederatedEdgeComputing/HEAD/DeepLearning/dataset/iris/database.sqlite
--------------------------------------------------------------------------------
/DeepLearning/Makefile:
--------------------------------------------------------------------------------
1 | all: clean build run
2 |
3 | clean:
4 | rm -rf main
5 | build:
6 | gcc -o main main.c -lm -Wall -Wextra -Ilib
7 | run:
8 | ./main
--------------------------------------------------------------------------------
/DeepLearning/dataset/wine/Index:
--------------------------------------------------------------------------------
1 | Index of wine
2 |
3 | 02 Dec 1996 105 Index
4 | 30 Oct 1995 10782 wine.data
5 | 19 Sep 1992 2643 wine.names
6 |
--------------------------------------------------------------------------------
/FederatedLearningFPGA/NeuralNetworkFPGA.qws:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/GitScrider/FederatedEdgeComputing/HEAD/FederatedLearningFPGA/NeuralNetworkFPGA.qws
--------------------------------------------------------------------------------
/FederatedLearningFPGA/db/NeuralNetworkFPGA_partition_pins.json:
--------------------------------------------------------------------------------
1 | {
2 | "partitions" : [
3 | {
4 | "name" : "Top",
5 | "pins" : []
6 | }
7 | ]
8 | }
--------------------------------------------------------------------------------
/FederatedLearningFPGA/db/NeuralNetworkFPGA.hif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/GitScrider/FederatedEdgeComputing/HEAD/FederatedLearningFPGA/db/NeuralNetworkFPGA.hif
--------------------------------------------------------------------------------
/CP210X driver/Windows/CP210xVCPInstaller_x64.exe:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/GitScrider/FederatedEdgeComputing/HEAD/CP210X driver/Windows/CP210xVCPInstaller_x64.exe
--------------------------------------------------------------------------------
/CP210X driver/Windows/CP210xVCPInstaller_x86.exe:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/GitScrider/FederatedEdgeComputing/HEAD/CP210X driver/Windows/CP210xVCPInstaller_x86.exe
--------------------------------------------------------------------------------
/CP210X driver/Windows/x64/WdfCoInstaller01009.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/GitScrider/FederatedEdgeComputing/HEAD/CP210X driver/Windows/x64/WdfCoInstaller01009.dll
--------------------------------------------------------------------------------
/CP210X driver/Windows/x64/WdfCoInstaller01011.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/GitScrider/FederatedEdgeComputing/HEAD/CP210X driver/Windows/x64/WdfCoInstaller01011.dll
--------------------------------------------------------------------------------
/CP210X driver/Windows/x86/WdfCoInstaller01009.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/GitScrider/FederatedEdgeComputing/HEAD/CP210X driver/Windows/x86/WdfCoInstaller01009.dll
--------------------------------------------------------------------------------
/CP210X driver/Windows/x86/WdfCoInstaller01011.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/GitScrider/FederatedEdgeComputing/HEAD/CP210X driver/Windows/x86/WdfCoInstaller01011.dll
--------------------------------------------------------------------------------
/FederatedLearningFPGA/db/NeuralNetworkFPGA.cbx.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/FederatedLearningFPGA/db/NeuralNetworkFPGA.asm.rdb:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/GitScrider/FederatedEdgeComputing/HEAD/FederatedLearningFPGA/db/NeuralNetworkFPGA.asm.rdb
--------------------------------------------------------------------------------
/FederatedLearningFPGA/db/NeuralNetworkFPGA.cmp.bpm:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/GitScrider/FederatedEdgeComputing/HEAD/FederatedLearningFPGA/db/NeuralNetworkFPGA.cmp.bpm
--------------------------------------------------------------------------------
/FederatedLearningFPGA/db/NeuralNetworkFPGA.cmp.cdb:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/GitScrider/FederatedEdgeComputing/HEAD/FederatedLearningFPGA/db/NeuralNetworkFPGA.cmp.cdb
--------------------------------------------------------------------------------
/FederatedLearningFPGA/db/NeuralNetworkFPGA.cmp.hdb:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/GitScrider/FederatedEdgeComputing/HEAD/FederatedLearningFPGA/db/NeuralNetworkFPGA.cmp.hdb
--------------------------------------------------------------------------------
/FederatedLearningFPGA/db/NeuralNetworkFPGA.cmp.idb:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/GitScrider/FederatedEdgeComputing/HEAD/FederatedLearningFPGA/db/NeuralNetworkFPGA.cmp.idb
--------------------------------------------------------------------------------
/FederatedLearningFPGA/db/NeuralNetworkFPGA.cmp.rdb:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/GitScrider/FederatedEdgeComputing/HEAD/FederatedLearningFPGA/db/NeuralNetworkFPGA.cmp.rdb
--------------------------------------------------------------------------------
/FederatedLearningFPGA/db/NeuralNetworkFPGA.lpc.rdb:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/GitScrider/FederatedEdgeComputing/HEAD/FederatedLearningFPGA/db/NeuralNetworkFPGA.lpc.rdb
--------------------------------------------------------------------------------
/FederatedLearningFPGA/db/NeuralNetworkFPGA.map.ammdb:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/GitScrider/FederatedEdgeComputing/HEAD/FederatedLearningFPGA/db/NeuralNetworkFPGA.map.ammdb
--------------------------------------------------------------------------------
/FederatedLearningFPGA/db/NeuralNetworkFPGA.map.bpm:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/GitScrider/FederatedEdgeComputing/HEAD/FederatedLearningFPGA/db/NeuralNetworkFPGA.map.bpm
--------------------------------------------------------------------------------
/FederatedLearningFPGA/db/NeuralNetworkFPGA.map.cdb:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/GitScrider/FederatedEdgeComputing/HEAD/FederatedLearningFPGA/db/NeuralNetworkFPGA.map.cdb
--------------------------------------------------------------------------------
/FederatedLearningFPGA/db/NeuralNetworkFPGA.map.hdb:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/GitScrider/FederatedEdgeComputing/HEAD/FederatedLearningFPGA/db/NeuralNetworkFPGA.map.hdb
--------------------------------------------------------------------------------
/FederatedLearningFPGA/db/NeuralNetworkFPGA.map.kpt:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/GitScrider/FederatedEdgeComputing/HEAD/FederatedLearningFPGA/db/NeuralNetworkFPGA.map.kpt
--------------------------------------------------------------------------------
/FederatedLearningFPGA/db/NeuralNetworkFPGA.map.rdb:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/GitScrider/FederatedEdgeComputing/HEAD/FederatedLearningFPGA/db/NeuralNetworkFPGA.map.rdb
--------------------------------------------------------------------------------
/FederatedLearningFPGA/db/NeuralNetworkFPGA.pplq.rdb:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/GitScrider/FederatedEdgeComputing/HEAD/FederatedLearningFPGA/db/NeuralNetworkFPGA.pplq.rdb
--------------------------------------------------------------------------------
/FederatedLearningFPGA/db/NeuralNetworkFPGA.rtlv.hdb:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/GitScrider/FederatedEdgeComputing/HEAD/FederatedLearningFPGA/db/NeuralNetworkFPGA.rtlv.hdb
--------------------------------------------------------------------------------
/FederatedLearningFPGA/db/NeuralNetworkFPGA.sgate.nvd:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/GitScrider/FederatedEdgeComputing/HEAD/FederatedLearningFPGA/db/NeuralNetworkFPGA.sgate.nvd
--------------------------------------------------------------------------------
/FederatedLearningFPGA/db/NeuralNetworkFPGA.sta.rdb:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/GitScrider/FederatedEdgeComputing/HEAD/FederatedLearningFPGA/db/NeuralNetworkFPGA.sta.rdb
--------------------------------------------------------------------------------
/FederatedLearningFPGA/db/NeuralNetworkFPGA.vpr.ammdb:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/GitScrider/FederatedEdgeComputing/HEAD/FederatedLearningFPGA/db/NeuralNetworkFPGA.vpr.ammdb
--------------------------------------------------------------------------------
/FederatedLearningServer/lib/websocketserver.h:
--------------------------------------------------------------------------------
1 | #ifndef WEBSOCKETSERVER_H
2 | #define WEBSOCKETSERVER_H
3 |
4 | void *start_websocketserver(void *args);
5 |
6 | #endif
7 |
--------------------------------------------------------------------------------
/FederatedLearningFPGA/db/NeuralNetworkFPGA.(0).cnf.cdb:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/GitScrider/FederatedEdgeComputing/HEAD/FederatedLearningFPGA/db/NeuralNetworkFPGA.(0).cnf.cdb
--------------------------------------------------------------------------------
/FederatedLearningFPGA/db/NeuralNetworkFPGA.(0).cnf.hdb:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/GitScrider/FederatedEdgeComputing/HEAD/FederatedLearningFPGA/db/NeuralNetworkFPGA.(0).cnf.hdb
--------------------------------------------------------------------------------
/FederatedLearningFPGA/db/NeuralNetworkFPGA.(1).cnf.cdb:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/GitScrider/FederatedEdgeComputing/HEAD/FederatedLearningFPGA/db/NeuralNetworkFPGA.(1).cnf.cdb
--------------------------------------------------------------------------------
/FederatedLearningFPGA/db/NeuralNetworkFPGA.(1).cnf.hdb:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/GitScrider/FederatedEdgeComputing/HEAD/FederatedLearningFPGA/db/NeuralNetworkFPGA.(1).cnf.hdb
--------------------------------------------------------------------------------
/FederatedLearningFPGA/db/NeuralNetworkFPGA.(2).cnf.cdb:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/GitScrider/FederatedEdgeComputing/HEAD/FederatedLearningFPGA/db/NeuralNetworkFPGA.(2).cnf.cdb
--------------------------------------------------------------------------------
/FederatedLearningFPGA/db/NeuralNetworkFPGA.(2).cnf.hdb:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/GitScrider/FederatedEdgeComputing/HEAD/FederatedLearningFPGA/db/NeuralNetworkFPGA.(2).cnf.hdb
--------------------------------------------------------------------------------
/FederatedLearningFPGA/db/NeuralNetworkFPGA.(3).cnf.cdb:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/GitScrider/FederatedEdgeComputing/HEAD/FederatedLearningFPGA/db/NeuralNetworkFPGA.(3).cnf.cdb
--------------------------------------------------------------------------------
/FederatedLearningFPGA/db/NeuralNetworkFPGA.(3).cnf.hdb:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/GitScrider/FederatedEdgeComputing/HEAD/FederatedLearningFPGA/db/NeuralNetworkFPGA.(3).cnf.hdb
--------------------------------------------------------------------------------
/FederatedLearningFPGA/db/NeuralNetworkFPGA.(4).cnf.cdb:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/GitScrider/FederatedEdgeComputing/HEAD/FederatedLearningFPGA/db/NeuralNetworkFPGA.(4).cnf.cdb
--------------------------------------------------------------------------------
/FederatedLearningFPGA/db/NeuralNetworkFPGA.(4).cnf.hdb:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/GitScrider/FederatedEdgeComputing/HEAD/FederatedLearningFPGA/db/NeuralNetworkFPGA.(4).cnf.hdb
--------------------------------------------------------------------------------
/FederatedLearningFPGA/db/NeuralNetworkFPGA.(5).cnf.cdb:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/GitScrider/FederatedEdgeComputing/HEAD/FederatedLearningFPGA/db/NeuralNetworkFPGA.(5).cnf.cdb
--------------------------------------------------------------------------------
/FederatedLearningFPGA/db/NeuralNetworkFPGA.(5).cnf.hdb:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/GitScrider/FederatedEdgeComputing/HEAD/FederatedLearningFPGA/db/NeuralNetworkFPGA.(5).cnf.hdb
--------------------------------------------------------------------------------
/FederatedLearningFPGA/db/NeuralNetworkFPGA.(6).cnf.cdb:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/GitScrider/FederatedEdgeComputing/HEAD/FederatedLearningFPGA/db/NeuralNetworkFPGA.(6).cnf.cdb
--------------------------------------------------------------------------------
/FederatedLearningFPGA/db/NeuralNetworkFPGA.(6).cnf.hdb:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/GitScrider/FederatedEdgeComputing/HEAD/FederatedLearningFPGA/db/NeuralNetworkFPGA.(6).cnf.hdb
--------------------------------------------------------------------------------
/FederatedLearningFPGA/db/NeuralNetworkFPGA.(7).cnf.cdb:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/GitScrider/FederatedEdgeComputing/HEAD/FederatedLearningFPGA/db/NeuralNetworkFPGA.(7).cnf.cdb
--------------------------------------------------------------------------------
/FederatedLearningFPGA/db/NeuralNetworkFPGA.(7).cnf.hdb:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/GitScrider/FederatedEdgeComputing/HEAD/FederatedLearningFPGA/db/NeuralNetworkFPGA.(7).cnf.hdb
--------------------------------------------------------------------------------
/FederatedLearningFPGA/db/NeuralNetworkFPGA.(8).cnf.cdb:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/GitScrider/FederatedEdgeComputing/HEAD/FederatedLearningFPGA/db/NeuralNetworkFPGA.(8).cnf.cdb
--------------------------------------------------------------------------------
/FederatedLearningFPGA/db/NeuralNetworkFPGA.(8).cnf.hdb:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/GitScrider/FederatedEdgeComputing/HEAD/FederatedLearningFPGA/db/NeuralNetworkFPGA.(8).cnf.hdb
--------------------------------------------------------------------------------
/FederatedLearningFPGA/db/NeuralNetworkFPGA.(9).cnf.cdb:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/GitScrider/FederatedEdgeComputing/HEAD/FederatedLearningFPGA/db/NeuralNetworkFPGA.(9).cnf.cdb
--------------------------------------------------------------------------------
/FederatedLearningFPGA/db/NeuralNetworkFPGA.(9).cnf.hdb:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/GitScrider/FederatedEdgeComputing/HEAD/FederatedLearningFPGA/db/NeuralNetworkFPGA.(9).cnf.hdb
--------------------------------------------------------------------------------
/FederatedLearningFPGA/db/NeuralNetworkFPGA.map_bb.cdb:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/GitScrider/FederatedEdgeComputing/HEAD/FederatedLearningFPGA/db/NeuralNetworkFPGA.map_bb.cdb
--------------------------------------------------------------------------------
/FederatedLearningFPGA/db/NeuralNetworkFPGA.map_bb.hdb:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/GitScrider/FederatedEdgeComputing/HEAD/FederatedLearningFPGA/db/NeuralNetworkFPGA.map_bb.hdb
--------------------------------------------------------------------------------
/FederatedLearningFPGA/db/NeuralNetworkFPGA.pre_map.hdb:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/GitScrider/FederatedEdgeComputing/HEAD/FederatedLearningFPGA/db/NeuralNetworkFPGA.pre_map.hdb
--------------------------------------------------------------------------------
/FederatedLearningFPGA/db/NeuralNetworkFPGA.routing.rdb:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/GitScrider/FederatedEdgeComputing/HEAD/FederatedLearningFPGA/db/NeuralNetworkFPGA.routing.rdb
--------------------------------------------------------------------------------
/FederatedLearningFPGA/db/NeuralNetworkFPGA.rtlv_sg.cdb:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/GitScrider/FederatedEdgeComputing/HEAD/FederatedLearningFPGA/db/NeuralNetworkFPGA.rtlv_sg.cdb
--------------------------------------------------------------------------------
/FederatedLearningFPGA/db/NeuralNetworkFPGA.(10).cnf.cdb:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/GitScrider/FederatedEdgeComputing/HEAD/FederatedLearningFPGA/db/NeuralNetworkFPGA.(10).cnf.cdb
--------------------------------------------------------------------------------
/FederatedLearningFPGA/db/NeuralNetworkFPGA.(10).cnf.hdb:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/GitScrider/FederatedEdgeComputing/HEAD/FederatedLearningFPGA/db/NeuralNetworkFPGA.(10).cnf.hdb
--------------------------------------------------------------------------------
/FederatedLearningFPGA/db/NeuralNetworkFPGA.(11).cnf.cdb:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/GitScrider/FederatedEdgeComputing/HEAD/FederatedLearningFPGA/db/NeuralNetworkFPGA.(11).cnf.cdb
--------------------------------------------------------------------------------
/FederatedLearningFPGA/db/NeuralNetworkFPGA.(11).cnf.hdb:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/GitScrider/FederatedEdgeComputing/HEAD/FederatedLearningFPGA/db/NeuralNetworkFPGA.(11).cnf.hdb
--------------------------------------------------------------------------------
/FederatedLearningFPGA/db/NeuralNetworkFPGA.(12).cnf.cdb:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/GitScrider/FederatedEdgeComputing/HEAD/FederatedLearningFPGA/db/NeuralNetworkFPGA.(12).cnf.cdb
--------------------------------------------------------------------------------
/FederatedLearningFPGA/db/NeuralNetworkFPGA.(12).cnf.hdb:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/GitScrider/FederatedEdgeComputing/HEAD/FederatedLearningFPGA/db/NeuralNetworkFPGA.(12).cnf.hdb
--------------------------------------------------------------------------------
/FederatedLearningFPGA/db/NeuralNetworkFPGA.(13).cnf.cdb:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/GitScrider/FederatedEdgeComputing/HEAD/FederatedLearningFPGA/db/NeuralNetworkFPGA.(13).cnf.cdb
--------------------------------------------------------------------------------
/FederatedLearningFPGA/db/NeuralNetworkFPGA.(13).cnf.hdb:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/GitScrider/FederatedEdgeComputing/HEAD/FederatedLearningFPGA/db/NeuralNetworkFPGA.(13).cnf.hdb
--------------------------------------------------------------------------------
/FederatedLearningFPGA/db/NeuralNetworkFPGA.(14).cnf.cdb:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/GitScrider/FederatedEdgeComputing/HEAD/FederatedLearningFPGA/db/NeuralNetworkFPGA.(14).cnf.cdb
--------------------------------------------------------------------------------
/FederatedLearningFPGA/db/NeuralNetworkFPGA.(14).cnf.hdb:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/GitScrider/FederatedEdgeComputing/HEAD/FederatedLearningFPGA/db/NeuralNetworkFPGA.(14).cnf.hdb
--------------------------------------------------------------------------------
/FederatedLearningFPGA/db/NeuralNetworkFPGA.(15).cnf.cdb:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/GitScrider/FederatedEdgeComputing/HEAD/FederatedLearningFPGA/db/NeuralNetworkFPGA.(15).cnf.cdb
--------------------------------------------------------------------------------
/FederatedLearningFPGA/db/NeuralNetworkFPGA.(15).cnf.hdb:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/GitScrider/FederatedEdgeComputing/HEAD/FederatedLearningFPGA/db/NeuralNetworkFPGA.(15).cnf.hdb
--------------------------------------------------------------------------------
/FederatedLearningFPGA/db/NeuralNetworkFPGA.(16).cnf.cdb:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/GitScrider/FederatedEdgeComputing/HEAD/FederatedLearningFPGA/db/NeuralNetworkFPGA.(16).cnf.cdb
--------------------------------------------------------------------------------
/FederatedLearningFPGA/db/NeuralNetworkFPGA.(16).cnf.hdb:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/GitScrider/FederatedEdgeComputing/HEAD/FederatedLearningFPGA/db/NeuralNetworkFPGA.(16).cnf.hdb
--------------------------------------------------------------------------------
/FederatedLearningFPGA/db/NeuralNetworkFPGA.(17).cnf.cdb:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/GitScrider/FederatedEdgeComputing/HEAD/FederatedLearningFPGA/db/NeuralNetworkFPGA.(17).cnf.cdb
--------------------------------------------------------------------------------
/FederatedLearningFPGA/db/NeuralNetworkFPGA.(17).cnf.hdb:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/GitScrider/FederatedEdgeComputing/HEAD/FederatedLearningFPGA/db/NeuralNetworkFPGA.(17).cnf.hdb
--------------------------------------------------------------------------------
/FederatedLearningFPGA/db/NeuralNetworkFPGA.(18).cnf.cdb:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/GitScrider/FederatedEdgeComputing/HEAD/FederatedLearningFPGA/db/NeuralNetworkFPGA.(18).cnf.cdb
--------------------------------------------------------------------------------
/FederatedLearningFPGA/db/NeuralNetworkFPGA.(18).cnf.hdb:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/GitScrider/FederatedEdgeComputing/HEAD/FederatedLearningFPGA/db/NeuralNetworkFPGA.(18).cnf.hdb
--------------------------------------------------------------------------------
/FederatedLearningFPGA/db/NeuralNetworkFPGA.(19).cnf.cdb:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/GitScrider/FederatedEdgeComputing/HEAD/FederatedLearningFPGA/db/NeuralNetworkFPGA.(19).cnf.cdb
--------------------------------------------------------------------------------
/FederatedLearningFPGA/db/NeuralNetworkFPGA.(19).cnf.hdb:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/GitScrider/FederatedEdgeComputing/HEAD/FederatedLearningFPGA/db/NeuralNetworkFPGA.(19).cnf.hdb
--------------------------------------------------------------------------------
/FederatedLearningFPGA/db/NeuralNetworkFPGA.(20).cnf.cdb:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/GitScrider/FederatedEdgeComputing/HEAD/FederatedLearningFPGA/db/NeuralNetworkFPGA.(20).cnf.cdb
--------------------------------------------------------------------------------
/FederatedLearningFPGA/db/NeuralNetworkFPGA.(20).cnf.hdb:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/GitScrider/FederatedEdgeComputing/HEAD/FederatedLearningFPGA/db/NeuralNetworkFPGA.(20).cnf.hdb
--------------------------------------------------------------------------------
/FederatedLearningFPGA/db/NeuralNetworkFPGA.(21).cnf.cdb:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/GitScrider/FederatedEdgeComputing/HEAD/FederatedLearningFPGA/db/NeuralNetworkFPGA.(21).cnf.cdb
--------------------------------------------------------------------------------
/FederatedLearningFPGA/db/NeuralNetworkFPGA.(21).cnf.hdb:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/GitScrider/FederatedEdgeComputing/HEAD/FederatedLearningFPGA/db/NeuralNetworkFPGA.(21).cnf.hdb
--------------------------------------------------------------------------------
/FederatedLearningFPGA/db/NeuralNetworkFPGA.(22).cnf.cdb:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/GitScrider/FederatedEdgeComputing/HEAD/FederatedLearningFPGA/db/NeuralNetworkFPGA.(22).cnf.cdb
--------------------------------------------------------------------------------
/FederatedLearningFPGA/db/NeuralNetworkFPGA.(22).cnf.hdb:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/GitScrider/FederatedEdgeComputing/HEAD/FederatedLearningFPGA/db/NeuralNetworkFPGA.(22).cnf.hdb
--------------------------------------------------------------------------------
/FederatedLearningFPGA/db/NeuralNetworkFPGA.(23).cnf.cdb:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/GitScrider/FederatedEdgeComputing/HEAD/FederatedLearningFPGA/db/NeuralNetworkFPGA.(23).cnf.cdb
--------------------------------------------------------------------------------
/FederatedLearningFPGA/db/NeuralNetworkFPGA.(23).cnf.hdb:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/GitScrider/FederatedEdgeComputing/HEAD/FederatedLearningFPGA/db/NeuralNetworkFPGA.(23).cnf.hdb
--------------------------------------------------------------------------------
/FederatedLearningFPGA/db/NeuralNetworkFPGA.(24).cnf.cdb:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/GitScrider/FederatedEdgeComputing/HEAD/FederatedLearningFPGA/db/NeuralNetworkFPGA.(24).cnf.cdb
--------------------------------------------------------------------------------
/FederatedLearningFPGA/db/NeuralNetworkFPGA.(24).cnf.hdb:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/GitScrider/FederatedEdgeComputing/HEAD/FederatedLearningFPGA/db/NeuralNetworkFPGA.(24).cnf.hdb
--------------------------------------------------------------------------------
/FederatedLearningFPGA/db/NeuralNetworkFPGA.(25).cnf.cdb:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/GitScrider/FederatedEdgeComputing/HEAD/FederatedLearningFPGA/db/NeuralNetworkFPGA.(25).cnf.cdb
--------------------------------------------------------------------------------
/FederatedLearningFPGA/db/NeuralNetworkFPGA.(25).cnf.hdb:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/GitScrider/FederatedEdgeComputing/HEAD/FederatedLearningFPGA/db/NeuralNetworkFPGA.(25).cnf.hdb
--------------------------------------------------------------------------------
/FederatedLearningFPGA/db/NeuralNetworkFPGA.(26).cnf.cdb:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/GitScrider/FederatedEdgeComputing/HEAD/FederatedLearningFPGA/db/NeuralNetworkFPGA.(26).cnf.cdb
--------------------------------------------------------------------------------
/FederatedLearningFPGA/db/NeuralNetworkFPGA.(26).cnf.hdb:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/GitScrider/FederatedEdgeComputing/HEAD/FederatedLearningFPGA/db/NeuralNetworkFPGA.(26).cnf.hdb
--------------------------------------------------------------------------------
/FederatedLearningFPGA/db/NeuralNetworkFPGA.(27).cnf.cdb:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/GitScrider/FederatedEdgeComputing/HEAD/FederatedLearningFPGA/db/NeuralNetworkFPGA.(27).cnf.cdb
--------------------------------------------------------------------------------
/FederatedLearningFPGA/db/NeuralNetworkFPGA.(27).cnf.hdb:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/GitScrider/FederatedEdgeComputing/HEAD/FederatedLearningFPGA/db/NeuralNetworkFPGA.(27).cnf.hdb
--------------------------------------------------------------------------------
/FederatedLearningFPGA/db/NeuralNetworkFPGA.asm_labs.ddb:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/GitScrider/FederatedEdgeComputing/HEAD/FederatedLearningFPGA/db/NeuralNetworkFPGA.asm_labs.ddb
--------------------------------------------------------------------------------
/FederatedLearningFPGA/db/NeuralNetworkFPGA.atom_fit.nvd:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/GitScrider/FederatedEdgeComputing/HEAD/FederatedLearningFPGA/db/NeuralNetworkFPGA.atom_fit.nvd
--------------------------------------------------------------------------------
/FederatedLearningFPGA/db/NeuralNetworkFPGA.atom_map.nvd:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/GitScrider/FederatedEdgeComputing/HEAD/FederatedLearningFPGA/db/NeuralNetworkFPGA.atom_map.nvd
--------------------------------------------------------------------------------
/FederatedLearningFPGA/db/NeuralNetworkFPGA.cmp_merge.kpt:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/GitScrider/FederatedEdgeComputing/HEAD/FederatedLearningFPGA/db/NeuralNetworkFPGA.cmp_merge.kpt
--------------------------------------------------------------------------------
/FederatedLearningFPGA/db/NeuralNetworkFPGA.sgate_sm.nvd:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/GitScrider/FederatedEdgeComputing/HEAD/FederatedLearningFPGA/db/NeuralNetworkFPGA.sgate_sm.nvd
--------------------------------------------------------------------------------
/FederatedLearningFPGA/output_files/NeuralNetworkFPGA.sof:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/GitScrider/FederatedEdgeComputing/HEAD/FederatedLearningFPGA/output_files/NeuralNetworkFPGA.sof
--------------------------------------------------------------------------------
/FederatedLearningFPGA/db/NeuralNetworkFPGA.rtlv_sg_swap.cdb:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/GitScrider/FederatedEdgeComputing/HEAD/FederatedLearningFPGA/db/NeuralNetworkFPGA.rtlv_sg_swap.cdb
--------------------------------------------------------------------------------
/FederatedLearningFPGA/db/NeuralNetworkFPGA.sgate_sm_bdd.nvd:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/GitScrider/FederatedEdgeComputing/HEAD/FederatedLearningFPGA/db/NeuralNetworkFPGA.sgate_sm_bdd.nvd
--------------------------------------------------------------------------------
/FederatedLearningFPGA/db/NeuralNetworkFPGA.tis_db_list.ddb:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/GitScrider/FederatedEdgeComputing/HEAD/FederatedLearningFPGA/db/NeuralNetworkFPGA.tis_db_list.ddb
--------------------------------------------------------------------------------
/FederatedLearningFPGA/output_files/NeuralNetworkFPGA.fit.rpt:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/GitScrider/FederatedEdgeComputing/HEAD/FederatedLearningFPGA/output_files/NeuralNetworkFPGA.fit.rpt
--------------------------------------------------------------------------------
/DeepLearning/dataset/glass/Index:
--------------------------------------------------------------------------------
1 | Index of glass
2 |
3 | 02 Dec 1996 139 Index
4 | 02 Mar 1993 11903 glass.data
5 | 16 Jul 1992 780 glass.tag
6 | 30 May 1989 3506 glass.names
7 |
--------------------------------------------------------------------------------
/FederatedLearningFPGA/db/NeuralNetworkFPGA.sld_design_entry.sci:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/GitScrider/FederatedEdgeComputing/HEAD/FederatedLearningFPGA/db/NeuralNetworkFPGA.sld_design_entry.sci
--------------------------------------------------------------------------------
/FederatedLearningFPGA/db/NeuralNetworkFPGA.db_info:
--------------------------------------------------------------------------------
1 | Quartus_Version = Version 23.1std.1 Build 993 05/14/2024 SC Lite Edition
2 | Version_Index = 570679552
3 | Creation_Time = Fri Dec 13 09:19:37 2024
4 |
--------------------------------------------------------------------------------
/FederatedLearningFPGA/db/NeuralNetworkFPGA.sld_design_entry_dsc.sci:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/GitScrider/FederatedEdgeComputing/HEAD/FederatedLearningFPGA/db/NeuralNetworkFPGA.sld_design_entry_dsc.sci
--------------------------------------------------------------------------------
/FederatedLearningFPGA/db/NeuralNetworkFPGA.tiscmp.fast_1200mv_0c.ddb:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/GitScrider/FederatedEdgeComputing/HEAD/FederatedLearningFPGA/db/NeuralNetworkFPGA.tiscmp.fast_1200mv_0c.ddb
--------------------------------------------------------------------------------
/FederatedLearningFPGA/db/NeuralNetworkFPGA.tiscmp.slow_1200mv_0c.ddb:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/GitScrider/FederatedEdgeComputing/HEAD/FederatedLearningFPGA/db/NeuralNetworkFPGA.tiscmp.slow_1200mv_0c.ddb
--------------------------------------------------------------------------------
/FederatedLearningFPGA/db/NeuralNetworkFPGA.tiscmp.slow_1200mv_85c.ddb:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/GitScrider/FederatedEdgeComputing/HEAD/FederatedLearningFPGA/db/NeuralNetworkFPGA.tiscmp.slow_1200mv_85c.ddb
--------------------------------------------------------------------------------
/FederatedLearningFPGA/db/NeuralNetworkFPGA.root_partition.map.reg_db.cdb:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/GitScrider/FederatedEdgeComputing/HEAD/FederatedLearningFPGA/db/NeuralNetworkFPGA.root_partition.map.reg_db.cdb
--------------------------------------------------------------------------------
/FederatedLearningFPGA/db/NeuralNetworkFPGA.sta_cmp.7_slow_1200mv_85c.tdb:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/GitScrider/FederatedEdgeComputing/HEAD/FederatedLearningFPGA/db/NeuralNetworkFPGA.sta_cmp.7_slow_1200mv_85c.tdb
--------------------------------------------------------------------------------
/FederatedLearningServer/lib/httpserver.h:
--------------------------------------------------------------------------------
1 | #ifndef HTTPSERVER_H
2 | #define HTTPSERVER_H
3 |
4 | #define IP_ADDRESS "192.168.15.50"
5 |
6 | void *start_httpserver(void *args);
7 |
8 |
9 |
10 |
11 | #endif
12 |
--------------------------------------------------------------------------------
/FederatedLearningFPGA/incremental_db/compiled_partitions/NeuralNetworkFPGA.rrp.hdb:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/GitScrider/FederatedEdgeComputing/HEAD/FederatedLearningFPGA/incremental_db/compiled_partitions/NeuralNetworkFPGA.rrp.hdb
--------------------------------------------------------------------------------
/FederatedLearningESP32/components/websocket/websocketclient.h:
--------------------------------------------------------------------------------
1 | #ifndef _websocketclient
2 | #define _websocketclient
3 |
4 | #define WEBSOCKET_SERVER "ws://192.168.15.50:8080/"
5 |
6 | void websocket_send_local_model();
7 |
8 | #endif
--------------------------------------------------------------------------------
/FederatedLearningFPGA/incremental_db/compiled_partitions/NeuralNetworkFPGA.db_info:
--------------------------------------------------------------------------------
1 | Quartus_Version = Version 23.1std.1 Build 993 05/14/2024 SC Lite Edition
2 | Version_Index = 570679552
3 | Creation_Time = Thu Sep 19 02:01:58 2024
4 |
--------------------------------------------------------------------------------
/FederatedLearningESP32/main/CMakeLists.txt:
--------------------------------------------------------------------------------
1 | idf_component_register(SRCS "espconfiguration.c" "main.c"
2 | INCLUDE_DIRS "."
3 |
4 |
5 | )
6 |
7 | spiffs_create_partition_image(storage ../data FLASH_IN_PROJECT)
--------------------------------------------------------------------------------
/CP210X driver/Linux/Linux_2.6.x_VCP_Driver_Source/Makefile:
--------------------------------------------------------------------------------
1 | obj-m = cp210x.o
2 | KVERSION = $(shell uname -r)
3 | all:
4 | make -C /lib/modules/$(KVERSION)/build M=$(PWD) modules
5 | clean:
6 | make -C /lib/modules/$(KVERSION)/build M=$(PWD) clean
7 |
8 |
--------------------------------------------------------------------------------
/CP210X driver/Linux/Linux_3.x.x_VCP_Driver_Source/Makefile:
--------------------------------------------------------------------------------
1 | obj-m = cp210x.o
2 | KVERSION = $(shell uname -r)
3 | all:
4 | make -C /lib/modules/$(KVERSION)/build M=$(PWD) modules
5 | clean:
6 | make -C /lib/modules/$(KVERSION)/build M=$(PWD) clean
7 |
8 |
--------------------------------------------------------------------------------
/FederatedLearningFPGA/db/NeuralNetworkFPGA.cycloneive_io_sim_cache.45um_ff_1200mv_0c_fast.hsd:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/GitScrider/FederatedEdgeComputing/HEAD/FederatedLearningFPGA/db/NeuralNetworkFPGA.cycloneive_io_sim_cache.45um_ff_1200mv_0c_fast.hsd
--------------------------------------------------------------------------------
/FederatedLearningFPGA/db/NeuralNetworkFPGA.cycloneive_io_sim_cache.45um_ii_1200mv_0c_slow.hsd:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/GitScrider/FederatedEdgeComputing/HEAD/FederatedLearningFPGA/db/NeuralNetworkFPGA.cycloneive_io_sim_cache.45um_ii_1200mv_0c_slow.hsd
--------------------------------------------------------------------------------
/FederatedLearningFPGA/db/NeuralNetworkFPGA.cycloneive_io_sim_cache.45um_ii_1200mv_85c_slow.hsd:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/GitScrider/FederatedEdgeComputing/HEAD/FederatedLearningFPGA/db/NeuralNetworkFPGA.cycloneive_io_sim_cache.45um_ii_1200mv_85c_slow.hsd
--------------------------------------------------------------------------------
/FederatedLearningFPGA/incremental_db/compiled_partitions/NeuralNetworkFPGA.root_partition.cmp.cdb:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/GitScrider/FederatedEdgeComputing/HEAD/FederatedLearningFPGA/incremental_db/compiled_partitions/NeuralNetworkFPGA.root_partition.cmp.cdb
--------------------------------------------------------------------------------
/FederatedLearningFPGA/incremental_db/compiled_partitions/NeuralNetworkFPGA.root_partition.cmp.dfp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/GitScrider/FederatedEdgeComputing/HEAD/FederatedLearningFPGA/incremental_db/compiled_partitions/NeuralNetworkFPGA.root_partition.cmp.dfp
--------------------------------------------------------------------------------
/FederatedLearningFPGA/incremental_db/compiled_partitions/NeuralNetworkFPGA.root_partition.cmp.hdb:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/GitScrider/FederatedEdgeComputing/HEAD/FederatedLearningFPGA/incremental_db/compiled_partitions/NeuralNetworkFPGA.root_partition.cmp.hdb
--------------------------------------------------------------------------------
/FederatedLearningFPGA/incremental_db/compiled_partitions/NeuralNetworkFPGA.root_partition.map.cdb:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/GitScrider/FederatedEdgeComputing/HEAD/FederatedLearningFPGA/incremental_db/compiled_partitions/NeuralNetworkFPGA.root_partition.map.cdb
--------------------------------------------------------------------------------
/FederatedLearningFPGA/incremental_db/compiled_partitions/NeuralNetworkFPGA.root_partition.map.dpi:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/GitScrider/FederatedEdgeComputing/HEAD/FederatedLearningFPGA/incremental_db/compiled_partitions/NeuralNetworkFPGA.root_partition.map.dpi
--------------------------------------------------------------------------------
/FederatedLearningFPGA/incremental_db/compiled_partitions/NeuralNetworkFPGA.root_partition.map.hdb:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/GitScrider/FederatedEdgeComputing/HEAD/FederatedLearningFPGA/incremental_db/compiled_partitions/NeuralNetworkFPGA.root_partition.map.hdb
--------------------------------------------------------------------------------
/FederatedLearningFPGA/incremental_db/compiled_partitions/NeuralNetworkFPGA.root_partition.map.kpt:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/GitScrider/FederatedEdgeComputing/HEAD/FederatedLearningFPGA/incremental_db/compiled_partitions/NeuralNetworkFPGA.root_partition.map.kpt
--------------------------------------------------------------------------------
/FederatedLearningServer/lib/websockethandlers.h:
--------------------------------------------------------------------------------
1 | #ifndef WEBSOCKETHANDLERS_H
2 | #define WEBSOCKETHANDLERS_H
3 |
4 | #define IP_ADDRESS "192.168.15.50"
5 |
6 | void handle_clint_model_message(const char * message, int length,char *ip_addr);
7 |
8 | #endif
9 |
--------------------------------------------------------------------------------
/FederatedLearningFPGA/incremental_db/compiled_partitions/NeuralNetworkFPGA.root_partition.cmp.ammdb:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/GitScrider/FederatedEdgeComputing/HEAD/FederatedLearningFPGA/incremental_db/compiled_partitions/NeuralNetworkFPGA.root_partition.cmp.ammdb
--------------------------------------------------------------------------------
/FederatedLearningFPGA/incremental_db/compiled_partitions/NeuralNetworkFPGA.root_partition.cmp.rcfdb:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/GitScrider/FederatedEdgeComputing/HEAD/FederatedLearningFPGA/incremental_db/compiled_partitions/NeuralNetworkFPGA.root_partition.cmp.rcfdb
--------------------------------------------------------------------------------
/FederatedLearningFPGA/incremental_db/compiled_partitions/NeuralNetworkFPGA.root_partition.map.hbdb.cdb:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/GitScrider/FederatedEdgeComputing/HEAD/FederatedLearningFPGA/incremental_db/compiled_partitions/NeuralNetworkFPGA.root_partition.map.hbdb.cdb
--------------------------------------------------------------------------------
/FederatedLearningFPGA/incremental_db/compiled_partitions/NeuralNetworkFPGA.root_partition.map.hbdb.hdb:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/GitScrider/FederatedEdgeComputing/HEAD/FederatedLearningFPGA/incremental_db/compiled_partitions/NeuralNetworkFPGA.root_partition.map.hbdb.hdb
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | .vscode
2 | FederatedLearningESP32/build
3 | FederatedLearningESP32/.devcontainer
4 | FederatedLearningESP32/.vscode
5 | FederatedLearningServer/.vscode
6 | FederatedLearningServer/.build
7 | FederatedLearningServer/FederatedLearningServer
8 |
9 |
10 |
--------------------------------------------------------------------------------
/FederatedLearningFPGA/incremental_db/compiled_partitions/NeuralNetworkFPGA.root_partition.map.hbdb.hb_info:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/GitScrider/FederatedEdgeComputing/HEAD/FederatedLearningFPGA/incremental_db/compiled_partitions/NeuralNetworkFPGA.root_partition.map.hbdb.hb_info
--------------------------------------------------------------------------------
/FederatedLearningFPGA/output_files/NeuralNetworkFPGA.sta.summary:
--------------------------------------------------------------------------------
1 | ------------------------------------------------------------
2 | Timing Analyzer Summary
3 | ------------------------------------------------------------
4 |
5 | ------------------------------------------------------------
6 |
--------------------------------------------------------------------------------
/FederatedLearningFPGA/output_files/NeuralNetworkFPGA.map.smsg:
--------------------------------------------------------------------------------
1 | Warning (10268): Verilog HDL information at Processor.v(31): always construct contains both blocking and non-blocking assignments File: C:/Development/FederatedEdgeComputing/FederatedLearningFPGA/output_files/Processor.v Line: 31
2 |
--------------------------------------------------------------------------------
/FederatedLearningFPGA/simulation/questa/NeuralNetworkFPGA_run_msim_gate_verilog.do:
--------------------------------------------------------------------------------
1 | transcript on
2 | if {[file exists gate_work]} {
3 | vdel -lib gate_work -all
4 | }
5 | vlib gate_work
6 | vmap work gate_work
7 |
8 | vlog -vlog01compat -work work +incdir+. {NeuralNetworkFPGA.vo}
9 |
10 |
--------------------------------------------------------------------------------
/FederatedLearningFPGA/simulation/questa/NeuralNetworkFPGA_run_msim_gate_verilog.do.bak:
--------------------------------------------------------------------------------
1 | transcript on
2 | if {[file exists gate_work]} {
3 | vdel -lib gate_work -all
4 | }
5 | vlib gate_work
6 | vmap work gate_work
7 |
8 | vlog -vlog01compat -work work +incdir+. {NeuralNetworkFPGA.vo}
9 |
10 |
--------------------------------------------------------------------------------
/FederatedLearningFPGA/output_files/NeuralNetworkFPGA.jdi:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/FederatedLearningESP32/partitions.csv:
--------------------------------------------------------------------------------
1 | # Name, Type, SubType, Offset, Size, Flags
2 | nvs, data, nvs, 0x9000, 0x4000,
3 | phy_init, data, phy, 0xf000, 0x1000,
4 | factory, app, factory, 0x10000, 0x200000,
5 | storage, data, spiffs, 0x210000, 0x100000,
6 |
--------------------------------------------------------------------------------
/FederatedLearningServer/lib/JSONConverter.h:
--------------------------------------------------------------------------------
1 | #ifndef HTTPHANDLERS_H
2 | #define HTTPHANDLERS_H
3 |
4 | #include "federatedlearning.h"
5 | #include "../lib/cJSON.h"
6 |
7 | cJSON* FederatedLearningToJSON(FederatedLearning* federatedLearning);
8 | FederatedLearning* JSONToFederatedLearning(const cJSON* json);
9 |
10 | #endif
--------------------------------------------------------------------------------
/FederatedLearningESP32/components/cJSON/JSONConverter.h:
--------------------------------------------------------------------------------
1 | #ifndef _jsonconverter
2 | #define _jsonconverter
3 |
4 | #include "federatedlearning.h"
5 | #include "cJSON.h"
6 |
7 | cJSON* federatedLearningToJSON(const FederatedLearning* federatedLearning);
8 | FederatedLearning* JSONToFederatedLearning(const cJSON* json);
9 |
10 | #endif
--------------------------------------------------------------------------------
/FederatedLearningFPGA/NeuralNetworkFPGA.v.bak:
--------------------------------------------------------------------------------
1 | module NeuralNetworkFPGA(
2 | input wire CLOCK_50,
3 | output reg [7:0] LEDG
4 | );
5 |
6 | reg [24:0] counter;
7 |
8 | always @(posedge CLOCK_50) begin
9 | counter <= counter + 1;
10 | if (counter == 0) begin
11 | LEDG <= ~LEDG;
12 | end
13 | end
14 |
15 | endmodule
--------------------------------------------------------------------------------
/FederatedLearningFPGA/output_files/Processor.v.bak:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | module arithmetic_logic_unit ();
5 |
6 | module
7 |
8 | module cache_data ();
9 |
10 | endmodule
11 |
12 | module instruction chache ();
13 |
14 | endmodule
15 |
16 |
17 | module clock_control ();
18 |
19 | endmodule
20 |
21 | module processor ();
22 |
23 | endmodule
--------------------------------------------------------------------------------
/FederatedLearningESP32/components/cJSON/CMakeLists.txt:
--------------------------------------------------------------------------------
1 | # CMakeLists.txt inside lib/FederatedLearning
2 |
3 | idf_component_register(
4 | SRCS "cJSON.c" "JSONConverter.c"
5 | INCLUDE_DIRS "."
6 | REQUIRES federatedlearning
7 | )
8 |
9 | # Adicione esta linha para tornar o diretório um componente IDF
10 | # set(COMPONENT_ADD_INCLUDEDIRS ".")
11 |
--------------------------------------------------------------------------------
/FederatedLearningFPGA/output_files/NeuralNetworkFPGA.cdf:
--------------------------------------------------------------------------------
1 | /* Quartus Prime Version 23.1std.1 Build 993 05/14/2024 SC Lite Edition */
2 | JedecChain;
3 | FileRevision(JESD32A);
4 | DefaultMfr(6E);
5 |
6 | P ActionCode(Ign)
7 | Device PartName(EP4CE115) MfrSpec(OpMask(0));
8 |
9 | ChainEnd;
10 |
11 | AlteraBegin;
12 | ChainType(JTAG);
13 | AlteraEnd;
14 |
--------------------------------------------------------------------------------
/FederatedLearningESP32/components/federatedlearning/CMakeLists.txt:
--------------------------------------------------------------------------------
1 | # CMakeLists.txt inside lib/FederatedLearning
2 |
3 | idf_component_register(
4 | SRCS "federatedlearning.c"
5 | INCLUDE_DIRS "."
6 | REQUIRES spiffs
7 | )
8 |
9 | # Adicione esta linha para tornar o diretório um componente IDF
10 | # set(COMPONENT_ADD_INCLUDEDIRS ".")
11 |
12 |
13 |
14 |
--------------------------------------------------------------------------------
/FederatedLearningESP32/components/http/CMakeLists.txt:
--------------------------------------------------------------------------------
1 | # CMakeLists.txt inside lib/FederatedLearning
2 |
3 | idf_component_register(
4 | SRCS "httpclient.c"
5 | INCLUDE_DIRS "."
6 | REQUIRES esp_http_client esp_timer federatedlearning cJSON
7 | )
8 |
9 | # Adicione esta linha para tornar o diretório um componente IDF
10 | # set(COMPONENT_ADD_INCLUDEDIRS ".")
11 |
--------------------------------------------------------------------------------
/FederatedLearningESP32/components/websocket/CMakeLists.txt:
--------------------------------------------------------------------------------
1 | # CMakeLists.txt inside lib/
2 |
3 | idf_component_register(
4 | SRCS "websocketclient.c"
5 | INCLUDE_DIRS "."
6 | REQUIRES esp_event espwebsocketclient cJSON federatedlearning
7 | )
8 |
9 | # Adicione esta linha para tornar o diretório um componente IDF
10 | # set(COMPONENT_ADD_INCLUDEDIRS ".")
11 |
--------------------------------------------------------------------------------
/FederatedLearningFPGA/db/NeuralNetworkFPGA.tmw_info:
--------------------------------------------------------------------------------
1 | start_full_compilation:s:00:00:35
2 | start_analysis_synthesis:s:00:00:12-start_full_compilation
3 | start_analysis_elaboration:s-start_full_compilation
4 | start_fitter:s:00:00:13-start_full_compilation
5 | start_assembler:s:00:00:04-start_full_compilation
6 | start_timing_analyzer:s:00:00:04-start_full_compilation
7 | start_eda_netlist_writer:s:00:00:02-start_full_compilation
8 |
--------------------------------------------------------------------------------
/FederatedLearningFPGA/.qsys_edit/preferences.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/DeepLearning/federatedlearning.h:
--------------------------------------------------------------------------------
1 | #ifndef _federatedlearning
2 | #define _federatedlearning
3 |
4 | //activation function
5 | #define PERCEPTRON 1
6 | #define RELU 2
7 | #define SIGMOID 3
8 |
9 | //output activation function
10 |
11 | #define SOFTMAX 4
12 |
13 | //loss function
14 | #define MINIMAL_MEAN_SQUARE 1
15 | #define CATEGORICAL_CROSS_ENTROPY 2
16 |
17 | //regularization
18 | #define NONE_REGULARIZATION 0
19 | #define L2 2
20 | #define L1 1
21 |
22 | #endif
--------------------------------------------------------------------------------
/FederatedLearningServer/README.md:
--------------------------------------------------------------------------------
1 | # FederatedLearningServer
2 |
3 |
4 | This is the Federated Server responsible for merge and distribute the global model for the ESP32 Clients for the training.
5 |
6 | The directory src have the necessary files and the lib directory is the .h correlated.
7 |
8 | The Makefile is configured as follows:
9 | * make: compile and generated the program
10 | * make clean: force remove of .o files inside the .build directory and the program file
11 | * make run: execute the program file
--------------------------------------------------------------------------------
/FederatedLearningFPGA/output_files/NeuralNetworkFPGA.map.summary:
--------------------------------------------------------------------------------
1 | Analysis & Synthesis Status : Successful - Fri Dec 13 02:13:09 2024
2 | Quartus Prime Version : 23.1std.1 Build 993 05/14/2024 SC Lite Edition
3 | Revision Name : NeuralNetworkFPGA
4 | Top-level Entity Name : NeuralNetworkFPGA
5 | Family : Cyclone IV E
6 | Total logic elements : 0
7 | Total combinational functions : 0
8 | Dedicated logic registers : 0
9 | Total registers : 0
10 | Total pins : 76
11 | Total virtual pins : 0
12 | Total memory bits : 0
13 | Embedded Multiplier 9-bit elements : 0
14 | Total PLLs : 0
15 |
--------------------------------------------------------------------------------
/FederatedLearningFPGA/simulation/questa/NeuralNetworkFPGA_run_msim_rtl_verilog.do:
--------------------------------------------------------------------------------
1 | transcript on
2 | if {[file exists rtl_work]} {
3 | vdel -lib rtl_work -all
4 | }
5 | vlib rtl_work
6 | vmap work rtl_work
7 |
8 | vlog -vlog01compat -work work +incdir+C:/Development/FederatedEdgeComputing/FederatedLearningFPGA {C:/Development/FederatedEdgeComputing/FederatedLearningFPGA/NeuralNetworkFPGA.v}
9 | vlog -vlog01compat -work work +incdir+C:/Development/FederatedEdgeComputing/FederatedLearningFPGA/output_files {C:/Development/FederatedEdgeComputing/FederatedLearningFPGA/output_files/Processor.v}
10 |
11 |
--------------------------------------------------------------------------------
/FederatedLearningFPGA/simulation/questa/NeuralNetworkFPGA_run_msim_rtl_verilog.do.bak:
--------------------------------------------------------------------------------
1 | transcript on
2 | if {[file exists rtl_work]} {
3 | vdel -lib rtl_work -all
4 | }
5 | vlib rtl_work
6 | vmap work rtl_work
7 |
8 | vlog -vlog01compat -work work +incdir+C:/Development/FederatedEdgeComputing/FederatedLearningFPGA {C:/Development/FederatedEdgeComputing/FederatedLearningFPGA/NeuralNetworkFPGA.v}
9 | vlog -vlog01compat -work work +incdir+C:/Development/FederatedEdgeComputing/FederatedLearningFPGA/output_files {C:/Development/FederatedEdgeComputing/FederatedLearningFPGA/output_files/Processor.v}
10 |
11 |
--------------------------------------------------------------------------------
/FederatedLearningESP32/main/espconfiguration.h:
--------------------------------------------------------------------------------
1 | #ifndef _espconfiguration
2 | #define _espconfiguration
3 |
4 | #include "driver/gpio.h"
5 | #include "driver/uart.h"
6 |
7 | #include "nvs_flash.h"
8 |
9 | #include "esp_log.h"
10 | #include "esp_wifi.h"
11 | #include "esp_spiffs.h"
12 |
13 |
14 | #define LED_PIN_ERROR 12
15 | #define LED_PIN_WORKING 14
16 | #define LED_PIN_SYNC 27
17 | #define BUTTON_PIN 26
18 |
19 |
20 | #define WIFI_SSID "56kbps2.4GHz"
21 | #define WIFI_PASSWORD "3392F15f16"
22 |
23 | void WIFIConfiguration();
24 | void UARTConfiguration();
25 | void GPIOConfiguration();
26 | void SPIFFSConfiguration();
27 | #endif
--------------------------------------------------------------------------------
/FederatedLearningServer/lib/httphandlers.h:
--------------------------------------------------------------------------------
1 | #ifndef HTTPHANDLERS_H
2 | #define HTTPHANDLERS_H
3 |
4 | //test
5 | void handle_testpost_request(int client_socket, const char *request_body);
6 | void handle_testget_request(int client_socket);
7 | //page
8 | void handle_root_request(int client_socket);
9 | //api
10 | void handle_get_noderegister(int client_socket,char *ip_addr);
11 | void handle_get_globalmodel(int client_socket);
12 | void handle_post_globalmodel(int client_socket,const char *request_body);
13 | void handle_get_checkmodelstatus(int client_socket,char *ip_addr);
14 | void handle_not_found_request(int client_socket);
15 |
16 | #endif
17 |
--------------------------------------------------------------------------------
/FederatedLearningFPGA/Readme:
--------------------------------------------------------------------------------
1 |
2 |
3 | iverilog -o icarus_testbench .\testbench\tb_alu\tb_ieee754_multiplier.v .\alu.v
4 | vvp .\icarus_testbench
5 |
6 |
7 | *Behavior Level
8 |
9 | *RTL (Register Transfer Level)
10 |
11 | *Formal Verification ABV - SVA / PSL
12 |
13 | *TestBench
14 |
15 | *Circuit Level
16 |
17 |
18 |
19 | MODULES
20 |
21 | ->ALU
22 | add mul div natexp
23 |
24 | ->NEURON
25 | z memory mux
26 | ->InputNeuron
27 |
28 | ->HiddenNeuron
29 | relu
30 | ->OutputNeuron
31 | softmax
32 |
33 | ->LAYER
34 |
35 | ->NEURAL-NETWORK
36 |
37 |
38 |
39 |
40 |
--------------------------------------------------------------------------------
/FederatedLearningServer/static/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Minha Página
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 | Federated Learning Server
14 |
15 |
16 |
--------------------------------------------------------------------------------
/FederatedLearningESP32/CMakeLists.txt:
--------------------------------------------------------------------------------
1 | # The following lines of boilerplate have to be in your project's CMakeLists
2 | # in this exact order for cmake to work correctly
3 | cmake_minimum_required(VERSION 3.16)
4 |
5 | include($ENV{IDF_PATH}/tools/cmake/project.cmake)
6 | project(FederatedLearningESP32)
7 |
8 | idf_build_set_property(COMPILE_OPTIONS "-Wno-error" APPEND)
9 |
10 |
11 | list(APPEND EXTRA_COMPONENT_DIRS "components/federatedfearning")
12 | list(APPEND EXTRA_COMPONENT_DIRS "components/http")
13 | list(APPEND EXTRA_COMPONENT_DIRS "components/CJSON")
14 | list(APPEND EXTRA_COMPONENT_DIRS "components/websocket")
15 | list(APPEND EXTRA_COMPONENT_DIRS "components/espwebsocketclient")
16 |
--------------------------------------------------------------------------------
/FederatedLearningFPGA/incremental_db/README:
--------------------------------------------------------------------------------
1 | This folder contains data for incremental compilation.
2 |
3 | The compiled_partitions sub-folder contains previous compilation results for each partition.
4 | As long as this folder is preserved, incremental compilation results from earlier compiles
5 | can be re-used. To perform a clean compilation from source files for all partitions, both
6 | the db and incremental_db folder should be removed.
7 |
8 | The imported_partitions sub-folder contains the last imported QXP for each imported partition.
9 | As long as this folder is preserved, imported partitions will be automatically re-imported
10 | when the db or incremental_db/compiled_partitions folders are removed.
11 |
12 |
--------------------------------------------------------------------------------
/FederatedLearningFPGA/output_files/NeuralNetworkFPGA.fit.summary:
--------------------------------------------------------------------------------
1 | Fitter Status : Successful - Fri Dec 13 02:13:22 2024
2 | Quartus Prime Version : 23.1std.1 Build 993 05/14/2024 SC Lite Edition
3 | Revision Name : NeuralNetworkFPGA
4 | Top-level Entity Name : NeuralNetworkFPGA
5 | Family : Cyclone IV E
6 | Device : EP4CE115F29C7
7 | Timing Models : Final
8 | Total logic elements : 0 / 114,480 ( 0 % )
9 | Total combinational functions : 0 / 114,480 ( 0 % )
10 | Dedicated logic registers : 0 / 114,480 ( 0 % )
11 | Total registers : 0
12 | Total pins : 76 / 529 ( 14 % )
13 | Total virtual pins : 0
14 | Total memory bits : 0 / 3,981,312 ( 0 % )
15 | Embedded Multiplier 9-bit elements : 0 / 532 ( 0 % )
16 | Total PLLs : 0 / 4 ( 0 % )
17 |
--------------------------------------------------------------------------------
/FederatedLearningFPGA/output_files/NeuralNetworkFPGA.fit.smsg:
--------------------------------------------------------------------------------
1 | Extra Info (176273): Performing register packing on registers with non-logic cell location assignments
2 | Extra Info (176274): Completed register packing on registers with non-logic cell location assignments
3 | Extra Info (176236): Started Fast Input/Output/OE register processing
4 | Extra Info (176237): Finished Fast Input/Output/OE register processing
5 | Extra Info (176238): Start inferring scan chains for DSP blocks
6 | Extra Info (176239): Inferring scan chains for DSP blocks is complete
7 | Extra Info (176248): Moving registers into I/O cells, Multiplier Blocks, and RAM blocks to improve timing and density
8 | Extra Info (176249): Finished moving registers into I/O cells, Multiplier Blocks, and RAM blocks
9 |
--------------------------------------------------------------------------------
/FederatedLearningESP32/components/http/httpclient.h:
--------------------------------------------------------------------------------
1 | #ifndef _httpclient
2 | #define _httpclient
3 |
4 | #include "esp_http_client.h"
5 | #include "federatedlearning.h"
6 | #include "JSONConverter.h"
7 |
8 |
9 | #define MAX_RETRIES 3
10 | #define TIMEOUT_MS 1000
11 |
12 | #define GET_GLOBAL_MODEL "http://192.168.15.50:8888/api/getglobalmodel"
13 | #define GET_GLOBAL_MODEL_STATUS "http://192.168.15.50:8888/api/checkglobalmodel"
14 | #define GET_REGISTER_NODE "http://192.168.15.50:8888/api/noderegister"
15 | #define POST_GLOBAL_MODEL "http://192.168.15.50:8888/api/postglobalmodel"
16 |
17 | FederatedLearning* getglobalmodel();
18 | int getglobalmodelstatus();
19 | void postglobalmodel();
20 | void getregisternode();
21 | void http_post_task(void *pvParameters);
22 |
23 | #endif
--------------------------------------------------------------------------------
/FederatedLearningFPGA/testbench/tb_alu/tb_ieee754_natural_exponential.v:
--------------------------------------------------------------------------------
1 | `timescale 1ns/1ns
2 |
3 | module tb_ieee754_divider;
4 |
5 | parameter ITER = 10;
6 |
7 | reg clock;
8 | reg reset;
9 | reg [31:0] A;
10 | wire [31:0] result;
11 | wire done;
12 |
13 | ieee754_natural_exponential #(ITER) uut (
14 | .clock(clock),
15 | .reset(reset),
16 | .A(A),
17 | .result(result),
18 | .done(done)
19 | );
20 |
21 | always #10 clock = ~clock;
22 |
23 | initial begin
24 |
25 | clock = 0;
26 | reset = 1;
27 | A = 32'h40400000; // 3.0
28 |
29 | #25;
30 | reset = 0;
31 |
32 | wait(done);
33 | $display("Time: %t | A: %h | Result: %h",$time, A, result);
34 | $finish;
35 |
36 | end
37 |
38 | endmodule
--------------------------------------------------------------------------------
/CP210X driver/Linux/Linux_3.x.x_VCP_Driver_Source/cp210x_gpio_example.c:
--------------------------------------------------------------------------------
1 | #include
2 | #include
3 | #include
4 | #include
5 |
6 | using namespace std;
7 |
8 | int main()
9 | {
10 | int fd;
11 | cout << "CP210x Serial Test\n";
12 | fd = open("/dev/ttyUSB0", O_RDWR | O_NOCTTY | O_NDELAY);
13 | if (fd == -1)
14 | {
15 | cout << "Error opening port /dev/ttyUSB0\n";
16 | return -1;
17 | }
18 |
19 | unsigned long gpio;
20 |
21 | ioctl(fd, 0x8000, &gpio);
22 | cout << "original gpio = ";
23 | cout << hex << gpio << endl;
24 | gpio = ~gpio;
25 | gpio = gpio << 8;
26 | gpio |= 0x00FF;
27 | cout << "gpio = ";
28 | cout << hex << gpio << endl;
29 | ioctl(fd, 0x8001, &gpio);
30 | ioctl(fd, 0x8000, &gpio);
31 | cout << "new gpio = ";
32 | cout << hex << gpio << endl;
33 |
34 | close(fd);
35 |
36 | return 0;
37 | }
38 |
--------------------------------------------------------------------------------
/DeepLearning/dataset/glass/glass.tag:
--------------------------------------------------------------------------------
1 | An original file donated by Vina Speihler
2 |
3 | ID, N -- numeric identifier of the instance
4 | RI, N -- refractive index
5 | NA2O, N -- Sodium oxide
6 | MGO, N -- magnesium oxide
7 | AL2O3, N -- aluminum oxide
8 | SIO2, N -- silcon oxide
9 | K2O, N -- potassium oxide
10 | CAO, N -- calcium oxide
11 | BAO, N -- barium oxide
12 | FE2O3, N -- iron oxide
13 | TYPE, N -- An unknown, but must correspond to the types in the paper
14 | CAMG, N -- Unsure
15 |
16 | Types include:
17 | 1. WF (Float Window)
18 | 2. WNF (Non-float Window)
19 | 3. C (Container)
20 | 4. T (Tableware)
21 | 5. H (Headlamp) 214 2568 14127 glass.dat
22 | 19 92 518 glass.tag
23 | 62 742 4775 glassx.dat
24 | 51 610 3928 nonwindo.dat
25 | 6 14 120 phones
26 | 163 1955 12552 window.dat
27 | 515 5981 36020 total
28 |
--------------------------------------------------------------------------------
/DeepLearning/dataset/iris/datasetevaluation.csv:
--------------------------------------------------------------------------------
1 | 75,6.4,2.9,4.3,1.3,0,1,0
2 | 121,6.9,3.2,5.7,2.3,0,0,1
3 | 145,6.7,3.3,5.7,2.5,0,0,1
4 | 65,5.6,2.9,3.6,1.3,0,1,0
5 | 133,6.4,2.8,5.6,2.2,0,0,1
6 | 108,7.3,2.9,6.3,1.8,0,0,1
7 | 34,5.5,4.2,1.4,0.2,1,0,0
8 | 80,5.7,2.6,3.5,1.0,0,1,0
9 | 62,5.9,3.0,4.2,1.5,0,1,0
10 | 135,6.1,2.6,5.6,1.4,0,0,1
11 | 123,7.7,2.8,6.7,2.0,0,0,1
12 | 18,5.1,3.5,1.4,0.3,1,0,0
13 | 47,5.1,3.8,1.6,0.2,1,0,0
14 | 124,6.3,2.7,4.9,1.8,0,0,1
15 | 76,6.6,3.0,4.4,1.4,0,1,0
16 | 19,5.7,3.8,1.7,0.3,1,0,0
17 | 36,5.0,3.2,1.2,0.2,1,0,0
18 | 97,5.7,2.9,4.2,1.3,0,1,0
19 | 149,6.2,3.4,5.4,2.3,0,0,1
20 | 27,5.0,3.4,1.6,0.4,1,0,0
21 | 82,5.5,2.4,3.7,1.0,0,1,0
22 | 86,6.0,3.4,4.5,1.6,0,1,0
23 | 81,5.5,2.4,3.8,1.1,0,1,0
24 | 141,6.7,3.1,5.6,2.4,0,0,1
25 | 16,5.7,4.4,1.5,0.4,1,0,0
26 | 137,6.3,3.4,5.6,2.4,0,0,1
27 | 78,6.7,3.0,5.0,1.7,0,1,0
28 | 58,4.9,2.4,3.3,1.0,0,1,0
29 | 69,6.2,2.2,4.5,1.5,0,1,0
30 | 64,6.1,2.9,4.7,1.4,0,1,0
--------------------------------------------------------------------------------
/FederatedLearningServer/datasetevaluation.csv:
--------------------------------------------------------------------------------
1 | 75,6.4,2.9,4.3,1.3,0,1,0
2 | 121,6.9,3.2,5.7,2.3,0,0,1
3 | 145,6.7,3.3,5.7,2.5,0,0,1
4 | 65,5.6,2.9,3.6,1.3,0,1,0
5 | 133,6.4,2.8,5.6,2.2,0,0,1
6 | 108,7.3,2.9,6.3,1.8,0,0,1
7 | 34,5.5,4.2,1.4,0.2,1,0,0
8 | 80,5.7,2.6,3.5,1.0,0,1,0
9 | 62,5.9,3.0,4.2,1.5,0,1,0
10 | 135,6.1,2.6,5.6,1.4,0,0,1
11 | 123,7.7,2.8,6.7,2.0,0,0,1
12 | 18,5.1,3.5,1.4,0.3,1,0,0
13 | 47,5.1,3.8,1.6,0.2,1,0,0
14 | 124,6.3,2.7,4.9,1.8,0,0,1
15 | 76,6.6,3.0,4.4,1.4,0,1,0
16 | 19,5.7,3.8,1.7,0.3,1,0,0
17 | 36,5.0,3.2,1.2,0.2,1,0,0
18 | 97,5.7,2.9,4.2,1.3,0,1,0
19 | 149,6.2,3.4,5.4,2.3,0,0,1
20 | 27,5.0,3.4,1.6,0.4,1,0,0
21 | 82,5.5,2.4,3.7,1.0,0,1,0
22 | 86,6.0,3.4,4.5,1.6,0,1,0
23 | 81,5.5,2.4,3.8,1.1,0,1,0
24 | 141,6.7,3.1,5.6,2.4,0,0,1
25 | 16,5.7,4.4,1.5,0.4,1,0,0
26 | 137,6.3,3.4,5.6,2.4,0,0,1
27 | 78,6.7,3.0,5.0,1.7,0,1,0
28 | 58,4.9,2.4,3.3,1.0,0,1,0
29 | 69,6.2,2.2,4.5,1.5,0,1,0
30 | 64,6.1,2.9,4.7,1.4,0,1,0
--------------------------------------------------------------------------------
/FederatedLearningServer/data/datasetevaluation.csv:
--------------------------------------------------------------------------------
1 | 75,6.4,2.9,4.3,1.3,0,1,0
2 | 121,6.9,3.2,5.7,2.3,0,0,1
3 | 145,6.7,3.3,5.7,2.5,0,0,1
4 | 65,5.6,2.9,3.6,1.3,0,1,0
5 | 133,6.4,2.8,5.6,2.2,0,0,1
6 | 108,7.3,2.9,6.3,1.8,0,0,1
7 | 34,5.5,4.2,1.4,0.2,1,0,0
8 | 80,5.7,2.6,3.5,1.0,0,1,0
9 | 62,5.9,3.0,4.2,1.5,0,1,0
10 | 135,6.1,2.6,5.6,1.4,0,0,1
11 | 123,7.7,2.8,6.7,2.0,0,0,1
12 | 18,5.1,3.5,1.4,0.3,1,0,0
13 | 47,5.1,3.8,1.6,0.2,1,0,0
14 | 124,6.3,2.7,4.9,1.8,0,0,1
15 | 76,6.6,3.0,4.4,1.4,0,1,0
16 | 19,5.7,3.8,1.7,0.3,1,0,0
17 | 36,5.0,3.2,1.2,0.2,1,0,0
18 | 97,5.7,2.9,4.2,1.3,0,1,0
19 | 149,6.2,3.4,5.4,2.3,0,0,1
20 | 27,5.0,3.4,1.6,0.4,1,0,0
21 | 82,5.5,2.4,3.7,1.0,0,1,0
22 | 86,6.0,3.4,4.5,1.6,0,1,0
23 | 81,5.5,2.4,3.8,1.1,0,1,0
24 | 141,6.7,3.1,5.6,2.4,0,0,1
25 | 16,5.7,4.4,1.5,0.4,1,0,0
26 | 137,6.3,3.4,5.6,2.4,0,0,1
27 | 78,6.7,3.0,5.0,1.7,0,1,0
28 | 58,4.9,2.4,3.3,1.0,0,1,0
29 | 69,6.2,2.2,4.5,1.5,0,1,0
30 | 64,6.1,2.9,4.7,1.4,0,1,0
--------------------------------------------------------------------------------
/FederatedLearningServer/Makefile:
--------------------------------------------------------------------------------
1 | CC = gcc
2 | CFLAGS = -Wall -Wextra
3 | DEBUGFLAGS = -g
4 | SRCDIR = src
5 | INCDIR = lib
6 | BUILDDIR = .build
7 | PROGRAM_NAME = FederatedLearningServer
8 | TARGET = $(PROGRAM_NAME)
9 | LIBS = -lpthread -lwebsockets -lm
10 |
11 | SOURCES := $(wildcard $(SRCDIR)/*.c)
12 | INCLUDES := $(wildcard $(INCDIR)/*.h)
13 | OBJECTS := $(filter-out $(SRCDIR)/main.c, $(SOURCES:$(SRCDIR)/%.c=$(BUILDDIR)/%.o))
14 |
15 | all: clean build run
16 |
17 | alldebug: clean builddebug rundebug
18 |
19 | build: $(TARGET)
20 |
21 | $(TARGET): $(OBJECTS)
22 | $(CC) $(CFLAGS) $^ main.c -o $@ $(LIBS)
23 |
24 | $(BUILDDIR)/%.o: $(SRCDIR)/%.c $(INCLUDES)
25 | $(CC) $(CFLAGS) -I$(INCDIR) -c $< -o $@
26 |
27 | builddebug:
28 | $(CC) $(CFLAGS) $(DEBUGFLAGS) $(SOURCES) main.c -o $(TARGET) $(LIBS)
29 |
30 | clean:
31 | rm -f $(BUILDDIR)/*.o $(TARGET)
32 |
33 | run:
34 | ./$(PROGRAM_NAME)
35 |
36 | rundebug:
37 | gdb ./$(TARGET)
--------------------------------------------------------------------------------
/FederatedLearningFPGA/testbench/tb_alu/tb_ieee754_to_parts.v:
--------------------------------------------------------------------------------
1 | `timescale 1ns / 1ps
2 |
3 | module tb_ieee754_to_parts;
4 |
5 | // Definição dos sinais de entrada e saída
6 | reg [31:0] ieee754;
7 | wire [31:0] integer_part;
8 | wire [31:0] fractional_part;
9 | wire sign;
10 |
11 | // Instancia o módulo que está sendo testado
12 | ieee754_to_parts uut (
13 | .ieee754(ieee754),
14 | .integer_part(integer_part),
15 | .fractional_part(fractional_part),
16 | .sign(sign)
17 | );
18 |
19 | initial begin
20 | // Inicializa a entrada com o valor de teste
21 | ieee754 = 32'b01000000111100000000000000000000; // 6.0 em IEEE 754
22 |
23 | // Aguarda um tempo para o módulo processar
24 | #10;
25 |
26 | // Exibe os resultados no console
27 | $display("IEEE 754: %b", ieee754);
28 | $display("Parte Inteira: %b (%d)", integer_part, integer_part);
29 | $display("Parte Fracionada: %b (%d)", fractional_part,fractional_part);
30 | $display("Sinal: %b", sign);
31 |
32 | // Termina a simulação
33 | $finish;
34 | end
35 |
36 | endmodule
37 |
--------------------------------------------------------------------------------
/FederatedLearningFPGA/NeuralNetworkFPGA_nativelink_simulation.rpt:
--------------------------------------------------------------------------------
1 | Info: Start Nativelink Simulation process
2 |
3 | ========= EDA Simulation Settings =====================
4 |
5 | Sim Mode : Gate
6 | Family : cycloneive
7 | Quartus root : c:/intelfpga_lite/23.1std/quartus/bin64/
8 | Quartus sim root : c:/intelfpga_lite/23.1std/quartus/eda/sim_lib
9 | Simulation Tool : questa intel fpga
10 | Simulation Language : verilog
11 | Simulation Mode : GUI
12 | Sim Output File : NeuralNetworkFPGA.vo
13 | Sim SDF file : NeuralNetworkFPGA__verilog.sdo
14 | Sim dir : simulation\questa
15 |
16 | =======================================================
17 |
18 | Info: Starting NativeLink simulation with Questa Intel FPGA software
19 | Sourced NativeLink script c:/intelfpga_lite/23.1std/quartus/common/tcl/internal/nativelink/modelsim.tcl
20 | Warning: File NeuralNetworkFPGA_run_msim_gate_verilog.do already exists - backing up current file as NeuralNetworkFPGA_run_msim_gate_verilog.do.bak
21 | Info: Spawning Questa Intel FPGA Simulation software
22 | Info: NativeLink simulation flow was successful
23 |
--------------------------------------------------------------------------------
/FederatedLearningESP32/data/dataset1.csv:
--------------------------------------------------------------------------------
1 | 1,5.1,3.5,1.4,0.2,1,0,0
2 | 143,5.8,2.7,5.1,1.9,0,0,1
3 | 2,4.9,3.0,1.4,0.2,1,0,0
4 | 29,5.2,3.4,1.4,0.2,1,0,0
5 | 79,6.0,2.9,4.5,1.5,0,1,0
6 | 15,5.8,4.0,1.2,0.2,1,0,0
7 | 38,4.9,3.1,1.5,0.1,1,0,0
8 | 148,6.5,3.0,5.2,2.0,0,0,1
9 | 42,4.5,2.3,1.3,0.3,1,0,0
10 | 63,6.0,2.2,4.0,1.0,0,1,0
11 | 134,6.3,2.8,5.1,1.5,0,0,1
12 | 32,5.4,3.4,1.5,0.4,1,0,0
13 | 88,6.3,2.3,4.4,1.3,0,1,0
14 | 71,5.9,3.2,4.8,1.8,0,1,0
15 | 106,7.6,3.0,6.6,2.1,0,0,1
16 | 41,5.0,3.5,1.3,0.3,1,0,0
17 | 150,5.9,3.0,5.1,1.8,0,0,1
18 | 17,5.4,3.9,1.3,0.4,1,0,0
19 | 128,6.1,3.0,4.9,1.8,0,0,1
20 | 30,4.7,3.2,1.6,0.2,1,0,0
21 | 110,7.2,3.6,6.1,2.5,0,0,1
22 | 125,6.7,3.3,5.7,2.1,0,0,1
23 | 100,5.7,2.8,4.1,1.3,0,1,0
24 | 117,6.5,3.0,5.5,1.8,0,0,1
25 | 40,5.1,3.4,1.5,0.2,1,0,0
26 | 116,6.4,3.2,5.3,2.3,0,0,1
27 | 28,5.2,3.5,1.5,0.2,1,0,0
28 | 70,5.6,2.5,3.9,1.1,0,1,0
29 | 114,5.7,2.5,5.0,2.0,0,0,1
30 | 91,5.5,2.6,4.4,1.2,0,1,0
31 | 98,6.2,2.9,4.3,1.3,0,1,0
32 | 144,6.8,3.2,5.9,2.3,0,0,1
33 | 66,6.7,3.1,4.4,1.4,0,1,0
34 | 7,4.6,3.4,1.4,0.3,1,0,0
35 | 113,6.8,3.0,5.5,2.1,0,0,1
36 | 59,6.6,2.9,4.6,1.3,0,1,0
37 | 10,4.9,3.1,1.5,0.1,1,0,0
38 | 126,7.2,3.2,6.0,1.8,0,0,1
39 | 56,5.7,2.8,4.5,1.3,0,1,0
40 | 55,6.5,2.8,4.6,1.5,0,1,0
--------------------------------------------------------------------------------
/FederatedLearningESP32/data/dataset2.csv:
--------------------------------------------------------------------------------
1 | 92,6.1,3.0,4.6,1.4,0,1,0
2 | 9,4.4,2.9,1.4,0.2,1,0,0
3 | 35,4.9,3.1,1.5,0.1,1,0,0
4 | 101,6.3,3.3,6.0,2.5,0,0,1
5 | 68,5.8,2.7,4.1,1.0,0,1,0
6 | 49,5.3,3.7,1.5,0.2,1,0,0
7 | 37,5.5,3.5,1.3,0.2,1,0,0
8 | 89,5.6,3.0,4.1,1.3,0,1,0
9 | 44,5.0,3.5,1.6,0.6,1,0,0
10 | 60,5.2,2.7,3.9,1.4,0,1,0
11 | 115,5.8,2.8,5.1,2.4,0,0,1
12 | 23,4.6,3.6,1.0,0.2,1,0,0
13 | 136,7.7,3.0,6.1,2.3,0,0,1
14 | 13,4.8,3.0,1.4,0.1,1,0,0
15 | 45,5.1,3.8,1.9,0.4,1,0,0
16 | 85,5.4,3.0,4.5,1.5,0,1,0
17 | 46,4.8,3.0,1.4,0.3,1,0,0
18 | 94,5.0,2.3,3.3,1.0,0,1,0
19 | 132,7.9,3.8,6.4,2.0,0,0,1
20 | 93,5.8,2.6,4.0,1.2,0,1,0
21 | 74,6.1,2.8,4.7,1.2,0,1,0
22 | 102,5.8,2.7,5.1,1.9,0,0,1
23 | 50,5.0,3.3,1.4,0.2,1,0,0
24 | 33,5.2,4.1,1.5,0.1,1,0,0
25 | 90,5.5,2.5,4.0,1.3,0,1,0
26 | 146,6.7,3.0,5.2,2.3,0,0,1
27 | 3,4.7,3.2,1.3,0.2,1,0,0
28 | 31,4.8,3.1,1.6,0.2,1,0,0
29 | 127,6.2,2.8,4.8,1.8,0,0,1
30 | 12,4.8,3.4,1.6,0.2,1,0,0
31 | 57,6.3,3.3,4.7,1.6,0,1,0
32 | 95,5.6,2.7,4.2,1.3,0,1,0
33 | 53,6.9,3.1,4.9,1.5,0,1,0
34 | 118,7.7,3.8,6.7,2.2,0,0,1
35 | 131,7.4,2.8,6.1,1.9,0,0,1
36 | 104,6.3,2.9,5.6,1.8,0,0,1
37 | 107,4.9,2.5,4.5,1.7,0,0,1
38 | 5,5.0,3.6,1.4,0.2,1,0,0
39 | 130,7.2,3.0,5.8,1.6,0,0,1
40 | 67,5.6,3.0,4.5,1.5,0,1,0
--------------------------------------------------------------------------------
/FederatedLearningESP32/data/dataset3.csv:
--------------------------------------------------------------------------------
1 | 52,6.4,3.2,4.5,1.5,0,1,0
2 | 48,4.6,3.2,1.4,0.2,1,0,0
3 | 73,6.3,2.5,4.9,1.5,0,1,0
4 | 61,5.0,2.0,3.5,1.0,0,1,0
5 | 96,5.7,3.0,4.2,1.2,0,1,0
6 | 112,6.4,2.7,5.3,1.9,0,0,1
7 | 147,6.3,2.5,5.0,1.9,0,0,1
8 | 54,5.5,2.3,4.0,1.3,0,1,0
9 | 26,5.0,3.0,1.6,0.2,1,0,0
10 | 129,6.4,2.8,5.6,2.1,0,0,1
11 | 20,5.1,3.8,1.5,0.3,1,0,0
12 | 120,6.0,2.2,5.0,1.5,0,0,1
13 | 72,6.1,2.8,4.0,1.3,0,1,0
14 | 8,5.0,3.4,1.5,0.2,1,0,0
15 | 87,6.7,3.1,4.7,1.5,0,1,0
16 | 139,6.0,3.0,4.8,1.8,0,0,1
17 | 109,6.7,2.5,5.8,1.8,0,0,1
18 | 51,7.0,3.2,4.7,1.4,0,1,0
19 | 43,4.4,3.2,1.3,0.2,1,0,0
20 | 119,7.7,2.6,6.9,2.3,0,0,1
21 | 83,5.8,2.7,3.9,1.2,0,1,0
22 | 77,6.8,2.8,4.8,1.4,0,1,0
23 | 105,6.5,3.0,5.8,2.2,0,0,1
24 | 39,4.4,3.0,1.3,0.2,1,0,0
25 | 11,5.4,3.7,1.5,0.2,1,0,0
26 | 99,5.1,2.5,3.0,1.1,0,1,0
27 | 138,6.4,3.1,5.5,1.8,0,0,1
28 | 142,6.9,3.1,5.1,2.3,0,0,1
29 | 111,6.5,3.2,5.1,2.0,0,0,1
30 | 22,5.1,3.7,1.5,0.4,1,0,0
31 | 21,5.4,3.4,1.7,0.2,1,0,0
32 | 4,4.6,3.1,1.5,0.2,1,0,0
33 | 24,5.1,3.3,1.7,0.5,1,0,0
34 | 25,4.8,3.4,1.9,0.2,1,0,0
35 | 84,6.0,2.7,5.1,1.6,0,1,0
36 | 6,5.4,3.9,1.7,0.4,1,0,0
37 | 103,7.1,3.0,5.9,2.1,0,0,1
38 | 14,4.3,3.0,1.1,0.1,1,0,0
39 | 122,5.6,2.8,4.9,2.0,0,0,1
40 | 140,6.9,3.1,5.4,2.1,0,0,1
--------------------------------------------------------------------------------
/FederatedLearningFPGA/test_adder.v:
--------------------------------------------------------------------------------
1 | module test_adder;
2 | reg [31:0] A, B;
3 | wire [31:0] result;
4 |
5 | ieee754_adder #(32) adder (
6 | .A(A),
7 | .B(B),
8 | .result(result)
9 | );
10 |
11 | initial begin
12 | $display("=== IEEE754 Adder Test ===");
13 |
14 | // Test 1: 0.5 + 1.0 = 1.5
15 | A = 32'h3f000000; // 0.5
16 | B = 32'h3f800000; // 1.0
17 | #10;
18 | $display("Test 1: %h + %h = %h (Expected: 1.5)", A, B, result);
19 |
20 | // Test 2: 1.5 + 1.0 = 2.5
21 | A = 32'h3fc00000; // 1.5
22 | B = 32'h3f800000; // 1.0
23 | #10;
24 | $display("Test 2: %h + %h = %h (Expected: 2.5)", A, B, result);
25 |
26 | // Test 3: 2.5 + 1.5 = 4.0
27 | A = 32'h40200000; // 2.5
28 | B = 32'h3fc00000; // 1.5
29 | #10;
30 | $display("Test 3: %h + %h = %h (Expected: 4.0)", A, B, result);
31 |
32 | // Test 4: 4.0 + 2.0 = 6.0
33 | A = 32'h40800000; // 4.0
34 | B = 32'h40000000; // 2.0
35 | #10;
36 | $display("Test 4: %h + %h = %h (Expected: 6.0)", A, B, result);
37 |
38 | $finish;
39 | end
40 | endmodule
41 |
--------------------------------------------------------------------------------
/FederatedLearningESP32/components/README:
--------------------------------------------------------------------------------
1 |
2 | This directory is intended for project specific (private) libraries.
3 | PlatformIO will compile them to static libraries and link into executable file.
4 |
5 | The source code of each library should be placed in a an own separate directory
6 | ("lib/your_library_name/[here are source files]").
7 |
8 | For example, see a structure of the following two libraries `Foo` and `Bar`:
9 |
10 | |--lib
11 | | |
12 | | |--Bar
13 | | | |--docs
14 | | | |--examples
15 | | | |--src
16 | | | |- Bar.c
17 | | | |- Bar.h
18 | | | |- library.json (optional, custom build options, etc) https://docs.platformio.org/page/librarymanager/config.html
19 | | |
20 | | |--Foo
21 | | | |- Foo.c
22 | | | |- Foo.h
23 | | |
24 | | |- README --> THIS FILE
25 | |
26 | |- platformio.ini
27 | |--src
28 | |- main.c
29 |
30 | and a contents of `src/main.c`:
31 | ```
32 | #include
33 | #include
34 |
35 | int main (void)
36 | {
37 | ...
38 | }
39 |
40 | ```
41 |
42 | PlatformIO Library Dependency Finder will find automatically dependent
43 | libraries scanning project source files.
44 |
45 | More information about PlatformIO Library Dependency Finder
46 | - https://docs.platformio.org/page/librarymanager/ldf.html
47 |
--------------------------------------------------------------------------------
/FederatedLearningESP32/components/espwebsocketclient/CMakeLists.txt:
--------------------------------------------------------------------------------
1 | # idf_build_get_property(target IDF_TARGET)
2 |
3 | # if(NOT CONFIG_WS_TRANSPORT AND NOT CMAKE_BUILD_EARLY_EXPANSION)
4 | # message(STATUS "Websocket transport is disabled so the esp_websocket_client component will not be built")
5 | # # note: the component is still included in the build so it can become visible again in config
6 | # # without needing to re-run CMake. However no source or header files are built.
7 | # idf_component_register()
8 | # return()
9 | # endif()
10 |
11 | # if(${IDF_TARGET} STREQUAL "linux")
12 | # idf_component_register(SRCS "esp_websocket_client.c"
13 | # REQUIRES esp-tls tcp_transport http_parser esp_event nvs_flash esp_stubs
14 | # PRIV_REQUIRES esp_timer)
15 | # else()
16 | # idf_component_register(SRCS "esp_websocket_client.c"
17 | # REQUIRES lwip esp-tls tcp_transport http_parser
18 | # PRIV_REQUIRES esp_timer esp_event)
19 | # endif()
20 |
21 | set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DDEBUG_FLAG")
22 |
23 |
24 | idf_component_register(
25 | SRCS "esp_websocket_client.c"
26 | INCLUDE_DIRS "."
27 | REQUIRES lwip esp-tls tcp_transport http_parser esp_event
28 | )
--------------------------------------------------------------------------------
/FederatedLearningFPGA/testbench/tb_miscellaneous/tb_memory.v:
--------------------------------------------------------------------------------
1 | `timescale 1ns / 1ps
2 |
3 | module memory_tb;
4 |
5 | parameter WORDS = 16;
6 |
7 | reg clock;
8 | reg reset;
9 | reg write_enable;
10 | reg [31:0] write_data;
11 | reg [$clog2(WORDS)-1:0] address;
12 | wire [31:0] read_data;
13 |
14 | memory_parametrized #(WORDS) uut (
15 | .clock(clock),
16 | .reset(reset),
17 | .write_enable(write_enable),
18 | .write_data(write_data),
19 | .address(address),
20 | .read_data(read_data)
21 | );
22 |
23 | initial begin
24 | clock = 0;
25 | forever #5 clock = ~clock;
26 | end
27 |
28 |
29 | initial begin
30 |
31 | reset = 1;
32 | write_enable = 0;
33 | write_data = 32'b0;
34 | address = 0;
35 |
36 | #10 reset = 0;
37 |
38 | #10 write_enable = 1; address = 3; write_data = 32'hDEADBEEF;
39 | #10 write_enable = 1; address = 5; write_data = 32'hCAFEBABE;
40 |
41 | #10 write_enable = 0; address = 3;
42 | #10 address = 5;
43 |
44 | #20 $finish;
45 | end
46 |
47 | initial begin
48 | $monitor("Time: %0t | Reset: %b | Write_Enable: %b | Address: %0d | Write_Data: %h | Read_Data: %h",
49 | $time, reset, write_enable, address, write_data, read_data);
50 | end
51 |
52 | endmodule
53 |
--------------------------------------------------------------------------------
/FederatedLearningFPGA/ieee745ALU.v.bak:
--------------------------------------------------------------------------------
1 | module ieee754_to_parts (
2 | input [31:0] ieee754, // Entrada: número em IEEE 754
3 | output reg [31:0] integer_part, // Saída: parte inteira em binário
4 | output reg [31:0] fractional_part, // Saída: parte fracionada em binário
5 | output reg sign // Saída: bit de sinal (0 para positivo, 1 para negativo)
6 | );
7 |
8 | always @(*) begin
9 | // Extrair o sinal
10 | sign = ieee754[31];
11 |
12 | // Extrair o expoente
13 | reg [7:0] exponent = ieee754[30:23] - 8'b01111111; // Subtrai o bias (127)
14 |
15 | // Extrair a mantissa (com bit implícito)
16 | reg [23:0] mantissa = {1'b1, ieee754[22:0]}; // Adiciona o bit implícito
17 |
18 | // Calcular a parte inteira e a parte fracionada
19 | integer_part = 0;
20 | fractional_part = 0;
21 |
22 | // Calcular a parte inteira
23 | if (exponent >= 0) begin
24 | integer_part = mantissa << exponent; // Desloca para a esquerda para calcular a parte inteira
25 | end else begin
26 | // Para expoentes negativos, a parte inteira será zero
27 | integer_part = 0;
28 | end
29 |
30 | // Calcular a parte fracionada
31 | fractional_part = mantissa >> (8 - exponent); // Ajusta para obter a parte fracionada
32 | end
33 |
34 | endmodule
35 |
--------------------------------------------------------------------------------
/FederatedLearningServer/src/websockethandlers.c:
--------------------------------------------------------------------------------
1 | #include "../lib/websockethandlers.h"
2 | #include "../lib/federatedlearning.h"
3 | #include "../lib/JSONConverter.h"
4 | #include
5 | #include
6 | #include
7 |
8 | void handle_clint_model_message(const char * message, int length,char *ip_addr){
9 |
10 | char* json_string;
11 | json_string =strndup(message, length);
12 |
13 | if (json_string != NULL) {
14 | cJSON *json_model = cJSON_Parse(json_string);
15 | if (json_model != NULL) {
16 |
17 | FederatedLearning *FederatedLearningInstance= getFederatedLearningInstance();
18 | ClientNode *currentclientnode = FederatedLearningInstance->nodecontrol->firstclientnode;
19 |
20 | while(currentclientnode!=NULL){
21 | if(strcmp(currentclientnode->ip_id,ip_addr)==0){
22 | break;
23 | }
24 | currentclientnode = currentclientnode->nextclientnode;
25 | }
26 |
27 | FederatedLearning *clientmodel = JSONToFederatedLearning(json_model);
28 | if(clientmodel != NULL){
29 | currentclientnode->interaction++;
30 | printf("Aggregating Local Model %s\n",ip_addr);
31 |
32 | AggregationModel(clientmodel);
33 | }
34 | cJSON_Delete(json_model);
35 | }
36 | free(json_string);
37 | }
38 | }
39 |
--------------------------------------------------------------------------------
/FederatedLearningFPGA/NeuralNetworkFPGA.qpf:
--------------------------------------------------------------------------------
1 | # -------------------------------------------------------------------------- #
2 | #
3 | # Copyright (C) 2023 Intel Corporation. All rights reserved.
4 | # Your use of Intel Corporation's design tools, logic functions
5 | # and other software and tools, and any partner logic
6 | # functions, and any output files from any of the foregoing
7 | # (including device programming or simulation files), and any
8 | # associated documentation or information are expressly subject
9 | # to the terms and conditions of the Intel Program License
10 | # Subscription Agreement, the Intel Quartus Prime License Agreement,
11 | # the Intel FPGA IP License Agreement, or other applicable license
12 | # agreement, including, without limitation, that your use is for
13 | # the sole purpose of programming logic devices manufactured by
14 | # Intel and sold by Intel or its authorized distributors. Please
15 | # refer to the applicable agreement for further details, at
16 | # https://fpgasoftware.intel.com/eula.
17 | #
18 | # -------------------------------------------------------------------------- #
19 | #
20 | # Quartus Prime
21 | # Version 23.1std.0 Build 991 11/28/2023 SC Lite Edition
22 | # Date created = 23:24:35 May 18, 2024
23 | #
24 | # -------------------------------------------------------------------------- #
25 |
26 | QUARTUS_VERSION = "23.1"
27 | DATE = "23:24:35 May 18, 2024"
28 |
29 | # Revisions
30 |
31 | PROJECT_REVISION = "NeuralNetworkFPGA"
32 |
--------------------------------------------------------------------------------
/FederatedLearningFPGA/testbench/tb_miscellaneous/tb_register.v:
--------------------------------------------------------------------------------
1 | `timescale 1ns / 1ps
2 |
3 | module register_tb;
4 |
5 | // Sinais do módulo
6 | reg clock;
7 | reg reset;
8 | reg [31:0] data;
9 | wire [31:0] register;
10 |
11 | // Instanciação do módulo
12 | register uut (
13 | .clock(clock),
14 | .reset(reset),
15 | .data(data),
16 | .register(register)
17 | );
18 |
19 | // Geração do clock (período = 10 ns)
20 | initial begin
21 | clock = 0;
22 | forever #5 clock = ~clock; // Inverte o clock a cada 5 ns
23 | end
24 |
25 | // Estímulos de teste
26 | initial begin
27 | // Inicializa sinais
28 | reset = 0;
29 | data = 32'h00000000;
30 |
31 | // Cenário 1: Reset ativo
32 | #10;
33 | reset = 1; // Ativa reset
34 | #10;
35 | reset = 0; // Desativa reset
36 |
37 | // Cenário 2: Carrega dados no registrador
38 | #10;
39 | data = 32'hA5A5A5A5; // Define o dado
40 | #10;
41 | data = 32'h5A5A5A5A;
42 |
43 | // Cenário 3: Verifica comportamento com reset durante operação
44 | #10;
45 | reset = 1; // Ativa reset novamente
46 | #10;
47 | reset = 0; // Desativa reset
48 |
49 | // Finaliza a simulação
50 | #20;
51 | $finish;
52 | end
53 |
54 | // Monitor para acompanhar os sinais
55 | initial begin
56 | $monitor("Time: %0t | Reset: %b | Data: %h | Register: %h", $time, reset, data, register);
57 | end
58 |
59 | endmodule
60 |
--------------------------------------------------------------------------------
/FederatedLearningFPGA/memory_32bit.v:
--------------------------------------------------------------------------------
1 | module memory_32bit #(
2 | parameter MEMORY_DEPTH = 256, // Default 256 words, can be changed
3 | parameter ADDR_WIDTH = $clog2(MEMORY_DEPTH)
4 | )(
5 | input wire clock, // Clock signal
6 | input wire reset, // Reset signal (active high)
7 | input wire write_enable, // Write enable signal
8 | input wire [ADDR_WIDTH-1:0] address, // Memory address
9 | input wire [31:0] write_data, // Data to write (32-bit)
10 | output reg [31:0] read_data // Data read from memory (32-bit)
11 | );
12 |
13 | // Memory array declaration
14 | reg [31:0] memory_array [0:MEMORY_DEPTH-1];
15 |
16 | // Loop variable for initialization
17 | integer i;
18 |
19 | // Memory initialization
20 | initial begin
21 | for (i = 0; i < MEMORY_DEPTH; i = i + 1) begin
22 | memory_array[i] = 32'h00000000; // Initialize all memory locations to 0
23 | end
24 | end
25 |
26 | // Write operation - synchronous
27 | always @(posedge clock) begin
28 | if (reset) begin
29 | // Reset all memory locations to 0
30 | for (i = 0; i < MEMORY_DEPTH; i = i + 1) begin
31 | memory_array[i] <= 32'h00000000;
32 | end
33 | end else if (write_enable) begin
34 | // Write data to specified address
35 | memory_array[address] <= write_data;
36 | end
37 | end
38 |
39 | // Read operation - asynchronous (combinational)
40 | always @(*) begin
41 | read_data = memory_array[address];
42 | end
43 |
44 | endmodule
--------------------------------------------------------------------------------
/FederatedLearningFPGA/testbench/tb_miscellaneous/tb_multiplexer_parametrized.v:
--------------------------------------------------------------------------------
1 | `timescale 1ns/1ps
2 |
3 | module tb_multiplexer_parametrized;
4 |
5 | // Parâmetros
6 | parameter NUM_INPUTS = 4; // Número de entradas
7 | parameter DATA_WIDTH = 32; // Largura de cada entrada
8 |
9 | // Sinais do módulo
10 | reg [NUM_INPUTS*DATA_WIDTH-1:0] in; // Entradas achatadas
11 | reg [$clog2(NUM_INPUTS)-1:0] sel; // Sinal de seleção
12 | wire [DATA_WIDTH-1:0] out; // Saída do MUX
13 |
14 | // Instância do módulo sob teste
15 | multiplexer_parametrized #(
16 | .NUM_INPUTS(NUM_INPUTS),
17 | .DATA_WIDTH(DATA_WIDTH)
18 | ) uut (
19 | .in(in),
20 | .sel(sel),
21 | .out(out)
22 | );
23 |
24 | // Inicialização dos sinais e teste
25 | initial begin
26 | // Inicializa os sinais
27 | in = 0;
28 | sel = 0;
29 |
30 | // Monitoramento dos sinais
31 | $monitor("Time: %0t | sel: %0d | out: %h", $time, sel, out);
32 |
33 | // Atribui valores para as entradas achatadas
34 | in = {32'hAAAA_BBBB, 32'hCCCC_DDDD, 32'hEEEE_FFFF, 32'h1234_5678}; // 4 entradas de 32 bits
35 |
36 | // Testa cada valor de `sel`
37 | #5 sel = 2'b00; // Deve selecionar a primeira entrada (32'hAAAA_BBBB)
38 | #5 sel = 2'b01; // Deve selecionar a segunda entrada (32'hCCCC_DDDD)
39 | #5 sel = 2'b10; // Deve selecionar a terceira entrada (32'hEEEE_FFFF)
40 | #5 sel = 2'b11; // Deve selecionar a quarta entrada (32'h1234_5678)
41 |
42 | // Finaliza a simulação
43 | #5 $finish;
44 | end
45 |
46 | endmodule
47 |
--------------------------------------------------------------------------------
/FederatedLearningServer/main.c:
--------------------------------------------------------------------------------
1 | #include "lib/httpserver.h"
2 | #include "lib/websocketserver.h"
3 | #include "lib/federatedlearning.h"
4 | #include "lib/JSONConverter.h"
5 | #include "lib/cJSON.h"
6 | #include
7 | #include
8 | #include
9 | #include
10 |
11 | struct ThreadArgs {
12 | int port;
13 | // Adicione outros argumentos conforme necessário
14 | };
15 |
16 |
17 | int main() {
18 |
19 | FederatedLearning *FDI = getFederatedLearningInstance();
20 | setFederatedLearningGlobalModel();
21 | //PerformanceMetrics(30,0.5);
22 |
23 | //PrintNeuralNeuralNetwork(FDI->neuralnetwork);
24 |
25 | cJSON *jsondata = FederatedLearningToJSON(FDI);
26 |
27 | //Imprimir o JSON resultante
28 | char* jsonString = cJSON_Print(jsondata);
29 | printf("%s\n", jsonString);
30 |
31 | //Liberar a memória alocada
32 | cJSON_Delete(jsondata);
33 | free(jsonString);
34 |
35 | // Inicializar o servidor HTTP em uma thread
36 | pthread_t http_thread;
37 | struct ThreadArgs threadArgsHTTP = {8888}; // Preencha os argumentos conforme necessário
38 | pthread_create(&http_thread, NULL, start_httpserver, (void *)&threadArgsHTTP);
39 |
40 |
41 | // Inicializar o servidor WebSocket em outra thread
42 | pthread_t websocket_thread;
43 | struct ThreadArgs threadArgsWebSocket = {8080}; // Preencha os argumentos conforme necessário
44 | pthread_create(&websocket_thread, NULL, start_websocketserver, (void *)&threadArgsWebSocket);
45 |
46 |
47 | // Aguardar as threads terminarem (não atingido neste exemplo)
48 | pthread_join(websocket_thread, NULL);
49 | pthread_join(http_thread, NULL);
50 |
51 | return 0;
52 |
53 | }
54 |
--------------------------------------------------------------------------------
/FederatedLearningFPGA/testbench/tb_alu/tb_ieee754_compare.v:
--------------------------------------------------------------------------------
1 | `timescale 1ns/1ps
2 |
3 | module tb_ieee754_compare;
4 |
5 | // Inputs
6 | reg [31:0] A;
7 | reg [31:0] B;
8 |
9 | // Output
10 | wire result;
11 |
12 | // Instância do módulo
13 | ieee754_compare uut (
14 | .A(A),
15 | .B(B),
16 | .result(result)
17 | );
18 |
19 | // Procedimento de teste
20 | initial begin
21 | $display("Início do Testbench");
22 | $monitor("Time: %0t | A: %d | B: %d | Result: %b", $time, A, B, result);
23 |
24 | // Caso 1: A > B (positivos)
25 | A = 32'h40480000; // 3.125 (positiva)
26 | B = 32'h40400000; // 3.0 (positiva)
27 | #10;
28 |
29 | // Caso 2: A < B (positivos)
30 | A = 32'h40400000; // 3.0 (positiva)
31 | B = 32'h40480000; // 3.125 (positiva)
32 | #10;
33 |
34 | // Caso 3: A e B iguais
35 | A = 32'h40480000; // 3.125
36 | B = 32'h40480000; // 3.125
37 | #10;
38 |
39 | // Caso 4: A > B (negativos)
40 | A = 32'hC0400000; // -3.0 (negativa)
41 | B = 32'hC0480000; // -3.125 (negativa)
42 | #10;
43 |
44 | // Caso 5: A < B (negativos)
45 | A = 32'hC0480000; // -3.125 (negativa)
46 | B = 32'hC0400000; // -3.0 (negativa)
47 | #10;
48 |
49 | // Caso 6: Sinais diferentes (A positivo, B negativo)
50 | A = 32'h40400000; // 3.0 (positiva)
51 | B = 32'hC0400000; // -3.0 (negativa)
52 | #10;
53 |
54 | // Caso 7: Sinais diferentes (A negativo, B positivo)
55 | A = 32'hC0400000; // -3.0 (negativa)
56 | B = 32'h40400000; // 3.0 (positiva)
57 | #10;
58 |
59 | // Fim do teste
60 | $display("Fim do Testbench");
61 | $finish;
62 | end
63 |
64 | endmodule
65 |
--------------------------------------------------------------------------------
/FederatedLearningFPGA/testbench/tb_alu/tb_ieee754_multiplier.v:
--------------------------------------------------------------------------------
1 | `timescale 1ns / 1ps
2 |
3 | module tb_ieee754_multiplier;
4 |
5 | reg [31:0] A, B;
6 | wire [31:0] result;
7 |
8 | // Instância do módulo ieee754_multiplier
9 | ieee754_multiplier #(32) uut (
10 | .A(A),
11 | .B(B),
12 | .result(result)
13 | );
14 |
15 | initial begin
16 |
17 | // Testes
18 | $display("Iniciando os testes...");
19 |
20 | // Teste 1: A = 3.2, B = 4.2
21 | A = 32'b01000000010011001100110011001100; // 3.2
22 | B = 32'b01000000100001100110011001100110; // 4.2
23 | #40; // Espera dois ciclos de clock
24 | $display("Teste 1: A = 3.2, B = 4.2, Resultado = %h", result);
25 |
26 | // Teste 2: A = 0.66, B = 0.51
27 | A = 32'b0_01111110_01010001111010111000010; // 0.66
28 | B = 32'b0_01111110_00000101000111101011100; // 0.51
29 | #40;
30 | $display("Teste 2: A = 0.66, B = 0.51, Resultado = %h", result);
31 |
32 | // Teste 3: A = -0.5, B = -6.4
33 | A = 32'b1_01111110_00000000000000000000000; // -0.5
34 | B = 32'b1_10000001_10011001100110011001100; // -6.4
35 | #40;
36 | $display("Teste 3: A = -0.5, B = -6.4, Resultado = %h", result);
37 |
38 | // Teste 4: A = -0.5, B = 6.4
39 | A = 32'b1_01111110_00000000000000000000000; // -0.5
40 | B = 32'b0_10000001_10011001100110011001100; // 6.4
41 | #40;
42 | $display("Teste 4: A = -0.5, B = 6.4, Resultado = %h", result);
43 |
44 | // Teste 5: Valores em hexadecimal
45 | A = 32'h4034b4b5; // 2.8235295
46 | B = 32'hbf70f0f1; // -0.9411765
47 | #40;
48 | $display("Teste 5: A = 2.8235295, B = -0.9411765, Resultado = %h", result);
49 |
50 | $finish;
51 | end
52 | endmodule
53 |
--------------------------------------------------------------------------------
/FederatedLearningESP32/README.md:
--------------------------------------------------------------------------------
1 | | Supported Targets | ESP32 | ESP32-C2 | ESP32-C3 | ESP32-C6 | ESP32-H2 | ESP32-S2 | ESP32-S3 |
2 | | ----------------- | ----- | -------- | -------- | -------- | -------- | -------- | -------- |
3 |
4 | # _Sample project_
5 |
6 | (See the README.md file in the upper level 'examples' directory for more information about examples.)
7 |
8 | This is the simplest buildable example. The example is used by command `idf.py create-project`
9 | that copies the project to user specified path and set it's name. For more information follow the [docs page](https://docs.espressif.com/projects/esp-idf/en/latest/api-guides/build-system.html#start-a-new-project)
10 |
11 |
12 |
13 | ## How to use example
14 | We encourage the users to use the example as a template for the new projects.
15 | A recommended way is to follow the instructions on a [docs page](https://docs.espressif.com/projects/esp-idf/en/latest/api-guides/build-system.html#start-a-new-project).
16 |
17 | ## Example folder contents
18 |
19 | The project **sample_project** contains one source file in C language [main.c](main/main.c). The file is located in folder [main](main).
20 |
21 | ESP-IDF projects are built using CMake. The project build configuration is contained in `CMakeLists.txt`
22 | files that provide set of directives and instructions describing the project's source files and targets
23 | (executable, library, or both).
24 |
25 | Below is short explanation of remaining files in the project folder.
26 |
27 | ```
28 | ├── CMakeLists.txt
29 | ├── main
30 | │ ├── CMakeLists.txt
31 | │ └── main.c
32 | └── README.md This is the file you are currently reading
33 | ```
34 | Additionally, the sample project contains Makefile and component.mk files, used for the legacy Make based build system.
35 | They are not used or needed when building with CMake and idf.py.
36 |
--------------------------------------------------------------------------------
/FederatedLearningFPGA/testbench/tb_alu/tb_ieee754_adder.v:
--------------------------------------------------------------------------------
1 | `timescale 1ns / 1ps
2 |
3 | module tb_ieee754_adder;
4 |
5 | reg [31:0] A, B;
6 | wire [31:0] result;
7 |
8 | // Instância do módulo ieee754_adder
9 | ieee754_adder #(32) uut (
10 | .A(A),
11 | .B(B),
12 | .result(result)
13 | );
14 |
15 | // Clock Generator
16 |
17 |
18 | initial begin
19 |
20 |
21 | // Testes
22 | $display("Iniciando os testes...");
23 |
24 | // Teste 1: A = 3.2, B = 4.2
25 | A = 32'b0_10000000_10011001100110011001100; // 3.2
26 | B = 32'b0_10000001_00001100110011001100110; // 4.2
27 | #40; // Espera dois ciclos de clock
28 | $display("Teste 1: A = 3.2, B = 4.2, Resultado = %h", result);
29 |
30 | // Teste 2: A = 0.66, B = 0.51
31 | A = 32'b0_01111110_01010001111010111000010; // 0.66
32 | B = 32'b0_01111110_00000101000111101011100; // 0.51
33 | #40;
34 | $display("Teste 2: A = 0.66, B = 0.51, Resultado = %h", result);
35 |
36 | // Teste 3: A = -0.5, B = -6.4
37 | A = 32'b1_01111110_00000000000000000000000; // -0.5
38 | B = 32'b1_10000001_10011001100110011001100; // -6.4
39 | #40;
40 | $display("Teste 3: A = -0.5, B = -6.4, Resultado = %h", result);
41 |
42 | // Teste 4: A = -0.5, B = 6.4
43 | A = 32'b1_01111110_00000000000000000000000; // -0.5
44 | B = 32'b0_10000001_10011001100110011001100; // 6.4
45 | #40;
46 | $display("Teste 4: A = -0.5, B = 6.4, Resultado = %h", result);
47 |
48 | // Teste 5: Valores em hexadecimal
49 | A = 32'h4034b4b5; // 2.8235295
50 | B = 32'hbf70f0f1; // -0.9411765
51 | #40;
52 | $display("Teste 5: A = 2.8235295, B = -0.9411765, Resultado = %h",result);
53 |
54 | $finish;
55 | end
56 | endmodule
57 |
--------------------------------------------------------------------------------
/FederatedLearningESP32/components/websocket/websocketclient.c:
--------------------------------------------------------------------------------
1 | #include
2 | #include
3 |
4 | #include "esp_log.h"
5 | #include "esp_event.h"
6 |
7 | #include "esp_websocket_client.h"
8 |
9 | #include "websocketclient.h"
10 | #include "cJSON.h"
11 | #include "JSONConverter.h"
12 | #include "federatedlearning.h"
13 |
14 | static const char *TAG = "WebSocketClient";
15 |
16 |
17 | static void websocket_event_handler(void *handler_args, esp_event_base_t base, int32_t event_id, void *event_data)
18 | {
19 | esp_websocket_event_data_t *data = (esp_websocket_event_data_t *)event_data;
20 | switch (event_id) {
21 | case WEBSOCKET_EVENT_CONNECTED:
22 | ESP_LOGI(TAG, "WEBSOCKET_EVENT_CONNECTED");
23 | break;
24 | case WEBSOCKET_EVENT_DATA:
25 | ESP_LOGW(TAG, "Received=%.*s\n", data->data_len, (char *)data->data_ptr);
26 | break;
27 | }
28 | }
29 |
30 | void websocket_send_local_model(){
31 |
32 | // Define the websocket connection
33 | esp_websocket_client_config_t websocket_cfg = {};
34 | websocket_cfg.uri = WEBSOCKET_SERVER;
35 | ESP_LOGI(TAG, "Connecting to %s ...", websocket_cfg.uri);
36 |
37 | // Connect to Websocket Server
38 | esp_websocket_client_handle_t client = esp_websocket_client_init(&websocket_cfg);
39 | esp_websocket_register_events(client, WEBSOCKET_EVENT_ANY, websocket_event_handler, (void *)client);
40 |
41 |
42 | esp_websocket_client_start(client);
43 |
44 | char *json_string = cJSON_Print(federatedLearningToJSON(getFederatedLearningInstance()));
45 |
46 | if (esp_websocket_client_is_connected(client)) {
47 | esp_websocket_client_send_text(client, json_string, strlen(json_string), portMAX_DELAY);
48 | }
49 | free(json_string);
50 |
51 | // Stop websocket connection
52 | esp_websocket_client_stop(client);
53 | ESP_LOGI(TAG, "Websocket Stopped");
54 | esp_websocket_client_destroy(client);
55 | }
--------------------------------------------------------------------------------
/FederatedLearningESP32/components/federatedlearning/federatedlearning.h:
--------------------------------------------------------------------------------
1 | #ifndef _federatedlearning
2 | #define _federatedlearning
3 |
4 | //activation function
5 | #define PERCEPTRON 1
6 | #define RELU 2
7 | #define SIGMOID 3
8 |
9 | //output activation function
10 | #define SOFTMAX 4
11 |
12 | //loss function
13 | #define MINIMAL_MEAN_SQUARE 1
14 | #define CATEGORICAL_CROSS_ENTROPY 2
15 |
16 | //regularization
17 | #define NONE_REGULARIZATION 0
18 | #define L1 1
19 | #define L2 2
20 |
21 | typedef struct Weight {
22 | float weight;
23 | struct Weight * previousweight, * nextweight;
24 | }Weight;
25 |
26 | typedef struct Neuron {
27 | char neurontype[20];
28 | int weights;
29 | float activationfunctionvalue;
30 | float bias;
31 | struct Weight * firstweight, * lastweight;
32 | struct Neuron * nextneuron, * previousneuron;
33 | }Neuron;
34 |
35 | typedef struct Layer {
36 | int activationfunctiontype;
37 | int neurons;
38 | struct Neuron * firstneuron, * lastneuron;
39 | struct Layer * previouslayer, * nextlayer;
40 | }Layer;
41 |
42 | typedef struct LayerConfig{
43 | struct LayerConfig *first, *next;
44 | int neurons;
45 | int activationfunctiontype;
46 | }LayerConfig;
47 |
48 | typedef struct NeuralNetwork {
49 | int epoch;
50 | float alpha;
51 | int regularization;
52 | float lambda;
53 | int percentualtraining;
54 | int lossfunctiontype;
55 | int layers;
56 | struct Layer * firstlayer, * lastlayer;
57 | }NeuralNetwork;
58 |
59 | typedef struct FederatedLearning{
60 | int globalmodelstatus;
61 | int trainingscounter;
62 | NeuralNetwork *neuralnetwork;
63 | }FederatedLearning;
64 |
65 | FederatedLearning *getFederatedLearningInstance();
66 | void replaceNeuralNetwork(FederatedLearning * newfederatedlearninginstance);
67 | void mergeNeuralNetwork(FederatedLearning * newfederatedlearninginstance);
68 | void PrintNeuralNetwork(NeuralNetwork * neuralnetwork);
69 | //void NeuralNetworkTraining(NeuralNetwork * neuralnetwork, float LearningRate,int epoch,int PercentualTraining);
70 | void NeuralNetworkTraining();
71 | void teste();
72 |
73 | #endif
--------------------------------------------------------------------------------
/DeepLearning/dataset/datasetcsvonehot.c:
--------------------------------------------------------------------------------
1 | #include
2 | #include
3 | #include
4 |
5 | #define MAX_LINE 256
6 | #define NUM_FEATURES 10 // ID + 9 atributos (sem TYPE)
7 | #define NUM_CLASSES 7 // Tipos 1 a 6
8 |
9 | void convert_glass_data_to_csv(const char *input_file, const char *output_file) {
10 | FILE *in = fopen(input_file, "r");
11 | FILE *out = fopen(output_file, "w");
12 |
13 | if (!in || !out) {
14 | printf("❌ Erro ao abrir arquivo.\n");
15 | if (in) fclose(in);
16 | if (out) fclose(out);
17 | return;
18 | }
19 |
20 | char line[MAX_LINE];
21 | while (fgets(line, sizeof(line), in)) {
22 | // Remove o \n no final da linha
23 | line[strcspn(line, "\r\n")] = 0;
24 |
25 | // Ignora linhas vazias
26 | if (strlen(line) == 0)
27 | continue;
28 |
29 | // Quebra a linha pelos delimitadores ","
30 | char *token = strtok(line, ",");
31 | double values[NUM_FEATURES + 1]; // +1 para TYPE
32 | int count = 0;
33 |
34 | while (token && count < NUM_FEATURES + 1) {
35 | values[count++] = atof(token);
36 | token = strtok(NULL, ",");
37 | }
38 |
39 | if (count < NUM_FEATURES + 1)
40 | continue; // pula linha incompleta
41 |
42 | int id = (int)values[0];
43 | int type = (int)values[NUM_FEATURES]; // última coluna é TYPE
44 |
45 | // Escreve as features (sem o campo TYPE original)
46 | fprintf(out, "%d", id);
47 | for (int i = 1; i < NUM_FEATURES; i++)
48 | fprintf(out, ",%.5f", values[i]);
49 |
50 | // Faz o one-hot encoding das classes (1 a 6)
51 | for (int c = 1; c <= NUM_CLASSES; c++)
52 | fprintf(out, ",%d", (c == type) ? 1 : 0);
53 |
54 | fprintf(out, "\n");
55 | }
56 |
57 | fclose(in);
58 | fclose(out);
59 | printf("✅ Conversão concluída!\n");
60 | printf("Arquivo de saída: %s\n", output_file);
61 | }
62 |
63 |
64 |
65 | int main() {
66 | convert_glass_data_to_csv("glass/glass.data", "glass/glass.csv");
67 | return 0;
68 | }
69 |
--------------------------------------------------------------------------------
/CP210X driver/Linux/Linux_2.6.x_VCP_Driver_Source/CP210x_VCP_Linux_2.6.x_Release_Notes.txt:
--------------------------------------------------------------------------------
1 | This bundle contains a modified CP210x driver for the 2.6.38 kernel (Ubuntu 11.04).
2 |
3 | It contains:
4 |
5 | - Fix for CP2104, now sets the baudrate via "SET_BAUDRATE/GET_BAUDRATE" command
6 | - Fix for CP2105, now stores the interface number for the device for multi interface support
7 | - Fix to support GPIO on all parts
8 | - Fix to correct control request for MHS, Line Control and Break support
9 |
10 | NOTE: This driver is an example of how to perform GPIO operations within the CP210x driver since
11 | the driver on kernel.org does not support GPIO at this time. This driver has only been written
12 | and tested on the Linux 2.6.38 kernel on Ubuntu 11.04. This driver is a modified version of the
13 | existing driver in the Linux 2.6.38 kernel, which is maintained at kernel.org. It is recommened
14 | to use the driver there that matches your specific kernel version:
15 |
16 | www.kernel.org
17 |
18 | Build instrutions:
19 |
20 | Ubuntu:
21 | 1. make ( your cp210x driver )
22 | 2. cp cp210x.ko to /lib/modules//kernel/drivers/usb/serial
23 | 3. insmod /lib/modules//kernel/drivers/usb/serial
32 | 6a. insmod /lib/modules//kernel/drivers/usb/serial
23 | 3. insmod /lib/modules//kernel/drivers/usb/serial
32 | 6a. insmod /lib/modules/
2 | #include
3 | #include
4 |
5 | #define MAX_LINES 1000
6 | #define MAX_COLS 100
7 | #define MAX_LINE_LEN 1024
8 |
9 | // Ajuste para o número de colunas de one-hot no seu CSV
10 | #define NUM_CLASSES 3
11 |
12 | int main() {
13 | FILE *in = fopen("wine/datasetevaluation.csv", "r");
14 | FILE *out = fopen("wine/datasetevaluationnormalized.csv", "w");
15 | if (!in || !out) {
16 | printf("Erro ao abrir arquivo.\n");
17 | return 1;
18 | }
19 |
20 | char line[MAX_LINE_LEN];
21 | float data[MAX_LINES][MAX_COLS];
22 | int n_lines = 0;
23 | int n_cols = 0;
24 |
25 | // Leitura do CSV
26 | while (fgets(line, sizeof(line), in)) {
27 | line[strcspn(line, "\r\n")] = 0; // remove newline
28 | char *token = strtok(line, ",");
29 | int col = 0;
30 | while (token != NULL) {
31 | data[n_lines][col++] = atof(token);
32 | token = strtok(NULL, ",");
33 | }
34 | if (n_lines == 0) n_cols = col; // define número de colunas
35 | n_lines++;
36 | if (n_lines >= MAX_LINES) break;
37 | }
38 |
39 | // Normalização min-max entre 0 e 1 (pula primeira coluna e one-hot)
40 | for (int col = 1; col < n_cols - NUM_CLASSES; col++) {
41 | float min = data[0][col];
42 | float max = data[0][col];
43 | for (int row = 0; row < n_lines; row++) {
44 | if (data[row][col] < min) min = data[row][col];
45 | if (data[row][col] > max) max = data[row][col];
46 | }
47 | float range = max - min;
48 | if (range == 0) range = 1; // evita divisão por zero
49 | for (int row = 0; row < n_lines; row++) {
50 | data[row][col] = (data[row][col] - min) / range;
51 | }
52 | }
53 |
54 | // Escrita do CSV normalizado
55 | for (int row = 0; row < n_lines; row++) {
56 | fprintf(out, "%.0f", data[row][0]); // primeira coluna (index) sem normalização
57 | for (int col = 1; col < n_cols; col++) {
58 | fprintf(out, ",%.6f", data[row][col]);
59 | }
60 | fprintf(out, "\n");
61 | }
62 |
63 | fclose(in);
64 | fclose(out);
65 |
66 | printf("Arquivo datasetnormalized.csv gerado com %d linhas e %d colunas.\n", n_lines, n_cols);
67 | return 0;
68 | }
69 |
--------------------------------------------------------------------------------
/DeepLearning/dataset/wine/datasetevaluation.csv:
--------------------------------------------------------------------------------
1 | 15,14.38,1.87,2.38,12,102,3.3,3.64,.29,2.96,7.5,1.2,3,1547,1,0,0
2 | 153,13.11,1.9,2.75,25.5,116,2.2,1.28,.26,1.56,7.1,.61,1.33,425,0,0,1
3 | 1,14.23,1.71,2.43,15.6,127,2.8,3.06,.28,2.29,5.64,1.04,3.92,1065,1,0,0
4 | 167,13.45,3.7,2.6,23,111,1.7,.92,.43,1.46,10.68,.85,1.56,695,0,0,1
5 | 27,13.39,1.77,2.62,16.1,93,2.85,2.94,.34,1.45,4.8,.92,3.22,1195,1,0,0
6 | 52,13.83,1.65,2.6,17.2,94,2.45,2.99,.22,2.29,5.6,1.24,3.37,1265,1,0,0
7 | 132,12.88,2.99,2.4,20,104,1.3,1.22,.24,.83,5.4,.74,1.42,530,0,0,1
8 | 36,13.48,1.81,2.41,20.5,100,2.7,2.98,.26,1.86,5.1,1.04,3.47,920,1,0,0
9 | 47,14.38,3.59,2.28,16,102,3.25,3.17,.27,2.19,4.9,1.04,3.44,1065,1,0,0
10 | 101,12.08,2.08,1.7,17.5,97,2.23,2.17,.26,1.4,3.3,1.27,2.96,710,0,1,0
11 | 60,12.37,.94,1.36,10.6,88,1.98,.57,.28,.42,1.95,1.05,1.82,520,0,1,0
12 | 8,14.06,2.15,2.61,17.6,121,2.6,2.51,.31,1.25,5.05,1.06,3.58,1295,1,0,0
13 | 133,12.81,2.31,2.4,24,98,1.15,1.09,.27,.83,5.7,.66,1.36,560,0,0,1
14 | 152,12.79,2.67,2.48,22,112,1.48,1.36,.24,1.26,10.8,.48,1.47,480,0,0,1
15 | 160,13.48,1.67,2.64,22.5,89,2.6,1.1,.52,2.29,11.75,.57,1.78,620,0,0,1
16 | 129,12.37,1.63,2.3,24.5,88,2.22,2.45,.4,1.9,2.12,.89,2.78,342,0,1,0
17 | 143,13.52,3.17,2.72,23.5,97,1.55,.52,.5,.55,4.35,.89,2.06,520,0,0,1
18 | 34,13.76,1.53,2.7,19.5,132,2.95,2.74,.5,1.35,5.4,1.25,3,1235,1,0,0
19 | 150,13.08,3.9,2.36,21.5,113,1.41,1.39,.34,1.14,9.40,.57,1.33,550,0,0,1
20 | 170,13.4,4.6,2.86,25,112,1.98,.96,.27,1.11,8.5,.67,1.92,630,0,0,1
21 | 29,13.87,1.9,2.8,19.4,107,2.95,2.97,.37,1.76,4.5,1.25,3.4,915,1,0,0
22 | 48,13.9,1.68,2.12,16,101,3.1,3.39,.21,2.14,6.1,.91,3.33,985,1,0,0
23 | 121,11.45,2.4,2.42,20,96,2.9,2.79,.32,1.83,3.25,.8,3.39,625,0,1,0
24 | 64,12.37,1.13,2.16,19,87,3.5,3.1,.19,1.87,4.45,1.22,2.87,420,0,1,0
25 | 106,12.42,2.55,2.27,22,90,1.68,1.84,.66,1.42,2.7,.86,3.3,315,0,1,0
26 | 77,13.03,.9,1.71,16,86,1.95,2.03,.24,1.46,4.6,1.19,2.48,392,0,1,0
27 | 164,12.96,3.45,2.35,18.5,106,1.39,.7,.4,.94,5.28,.68,1.75,675,0,0,1
28 | 104,11.82,1.72,1.88,19.5,86,2.5,1.64,.37,1.42,2.06,.94,2.44,415,0,1,0
29 | 44,13.24,3.98,2.29,17.5,103,2.64,2.63,.32,1.66,4.36,.82,3,680,1,0,0
30 | 171,12.2,3.03,2.32,19,96,1.25,.49,.4,.73,5.5,.66,1.83,510,0,0,1
31 | 94,12.29,2.83,2.22,18,88,2.45,2.25,.25,1.99,2.15,1.15,3.3,290,0,1,0
32 | 50,13.94,1.73,2.27,17.4,108,2.88,3.54,.32,2.08,8.90,1.12,3.1,1260,1,0,0
33 | 79,12.33,.99,1.95,14.8,136,1.9,1.85,.35,2.76,3.4,1.06,2.31,750,0,1,0
34 | 68,12.37,1.17,1.92,19.6,78,2.11,2,.27,1.04,4.68,1.12,3.48,510,0,1,0
35 | 151,13.5,3.12,2.62,24,123,1.4,1.57,.22,1.25,8.60,.59,1.3,500,0,0,1
36 |
--------------------------------------------------------------------------------
/FederatedLearningFPGA/db/NeuralNetworkFPGA.npp.qmsg:
--------------------------------------------------------------------------------
1 | { "Info" "IQEXE_SEPARATOR" "" "*******************************************************************" { } { } 3 0 "*******************************************************************" 0 0 "Design Software" 0 -1 1734066845017 ""}
2 | { "Info" "IQEXE_START_BANNER_PRODUCT" "Netlist Viewers Preprocess Quartus Prime " "Running Quartus Prime Netlist Viewers Preprocess" { { "Info" "IQEXE_START_BANNER_VERSION" "Version 23.1std.1 Build 993 05/14/2024 SC Lite Edition " "Version 23.1std.1 Build 993 05/14/2024 SC Lite Edition" { } { } 0 0 "%1!s!" 0 0 "Design Software" 0 -1 1734066845017 ""} { "Info" "IQEXE_START_BANNER_TIME" "Fri Dec 13 02:14:04 2024 " "Processing started: Fri Dec 13 02:14:04 2024" { } { } 0 0 "Processing started: %1!s!" 0 0 "Design Software" 0 -1 1734066845017 ""} } { } 4 0 "Running %2!s! %1!s!" 0 0 "Netlist Viewers Preprocess" 0 -1 1734066845017 ""}
3 | { "Info" "IQEXE_START_BANNER_COMMANDLINE" "quartus_npp NeuralNetworkFPGA -c NeuralNetworkFPGA --netlist_type=sgate " "Command: quartus_npp NeuralNetworkFPGA -c NeuralNetworkFPGA --netlist_type=sgate" { } { } 0 0 "Command: %1!s!" 0 0 "Netlist Viewers Preprocess" 0 -1 1734066845017 ""}
4 | { "Warning" "WQCU_PARALLEL_USER_SHOULD_SPECIFY_NUM_PROC" "" "Number of processors has not been specified which may cause overloading on shared machines. Set the global assignment NUM_PARALLEL_PROCESSORS in your QSF to an appropriate value for best performance." { } { } 0 18236 "Number of processors has not been specified which may cause overloading on shared machines. Set the global assignment NUM_PARALLEL_PROCESSORS in your QSF to an appropriate value for best performance." 0 0 "Netlist Viewers Preprocess" 0 -1 1734066845270 ""}
5 | { "Info" "IQEXE_ERROR_COUNT" "Netlist Viewers Preprocess 0 s 1 Quartus Prime " "Quartus Prime Netlist Viewers Preprocess was successful. 0 errors, 1 warning" { { "Info" "IQEXE_END_PEAK_VSIZE_MEMORY" "4606 " "Peak virtual memory: 4606 megabytes" { } { } 0 0 "Peak virtual memory: %1!s! megabytes" 0 0 "Design Software" 0 -1 1734066848336 ""} { "Info" "IQEXE_END_BANNER_TIME" "Fri Dec 13 02:14:08 2024 " "Processing ended: Fri Dec 13 02:14:08 2024" { } { } 0 0 "Processing ended: %1!s!" 0 0 "Design Software" 0 -1 1734066848336 ""} { "Info" "IQEXE_ELAPSED_TIME" "00:00:04 " "Elapsed time: 00:00:04" { } { } 0 0 "Elapsed time: %1!s!" 0 0 "Design Software" 0 -1 1734066848336 ""} { "Info" "IQEXE_ELAPSED_CPU_TIME" "00:00:03 " "Total CPU time (on all processors): 00:00:03" { } { } 0 0 "Total CPU time (on all processors): %1!s!" 0 0 "Design Software" 0 -1 1734066848336 ""} } { } 0 0 "%6!s! %1!s! was successful. %2!d! error%3!s!, %4!d! warning%5!s!" 0 0 "Netlist Viewers Preprocess" 0 -1 1734066848336 ""}
6 |
--------------------------------------------------------------------------------
/CP210X driver/Linux/Linux_2.6.x_VCP_Driver_Source/cp210x_gpio_example.c:
--------------------------------------------------------------------------------
1 | #include
2 | #include
3 | #include
4 | #include
5 |
6 | using namespace std;
7 |
8 | #define TTY_DEVICE "/dev/ttyUSB0"
9 |
10 | #define IOCTL_GPIOGET 0x8000
11 | #define IOCTL_GPIOSET 0x8001
12 |
13 | int main()
14 | {
15 | int fd;
16 | int result = 0;
17 |
18 | cout << "CP210x GPIO Example\n";
19 | fd = open(TTY_DEVICE, O_RDWR | O_NOCTTY | O_NDELAY);
20 | if (fd == -1)
21 | {
22 | cout << "Error opening port " << TTY_DEVICE << endl;
23 | return -1;
24 | }
25 |
26 | unsigned long gpio;
27 |
28 | // Display the original GPIO value
29 | result = ioctl(fd, IOCTL_GPIOGET, &gpio);
30 | cout << "Original GPIO = " << hex << gpio << ", result = " << result << endl;
31 |
32 | // Now set GPIO, value defined as bit 0-15, mask, and bit 16-31, value:
33 | //
34 | // Bit 0 = GPIO0 Mask
35 | // Bit 1 = GPIO1 Mask
36 | // Bit 2 = GPIO2 Mask
37 | // Bit 3 = GPIO3 Mask
38 | // Bit 4 = GPIO4 Mask
39 | // Bit 5 = GPIO5 Mask
40 | // Bit 6 = GPIO6 Mask
41 | // Bit 7 = GPIO7 Mask
42 | // Bit 8 = GPIO8 Mask
43 | // Bit 9 = GPIO9 Mask
44 | // Bit 10 = GPIO10 Mask
45 | // Bit 11 = GPIO11 Mask
46 | // Bit 12 = GPIO12 Mask
47 | // Bit 13 = GPIO13 Mask
48 | // Bit 14 = GPIO14 Mask
49 | // Bit 15 = GPIO15 Mask
50 | // Bit 16 = GPIO0 Value
51 | // Bit 17 = GPIO1 Value
52 | // Bit 18 = GPIO2 Value
53 | // Bit 19 = GPIO3 Value
54 | // Bit 20 = GPIO4 Value
55 | // Bit 21 = GPIO5 Value
56 | // Bit 22 = GPIO6 Value
57 | // Bit 23 = GPIO7 Value
58 | // Bit 24 = GPIO8 Value
59 | // Bit 25 = GPIO9 Value
60 | // Bit 26 = GPIO10 Value
61 | // Bit 27 = GPIO11 Value
62 | // Bit 28 = GPIO12 Value
63 | // Bit 29 = GPIO13 Value
64 | // Bit 30 = GPIO14 Value
65 | // Bit 31 = GPIO15 Value
66 | //
67 | // Note: Each device supports a different number of GPIO -
68 | // check the data sheet for exact GPIO values available.
69 | //
70 | // GPIO on CP2105 is exclusive to the COM port interface,
71 | // while on CP2108 all GPIO is accessible to any interface
72 |
73 | // Flip the GPIO state:
74 | // Reverse the bits, then shift left 8 bits
75 | // to declare the new values, then or in FF
76 | // to set the mask to write all values
77 | gpio = ~gpio;
78 | //gpio = gpio << 8;
79 | //gpio |= 0x00FF;
80 | gpio = gpio << 16;
81 | gpio |= 0xFFFF;
82 | result = ioctl(fd, IOCTL_GPIOSET, &gpio);
83 | cout << "GPIO to set = " << hex << gpio << ", result = " << result << endl;
84 |
85 | // Now check the new GPIO value
86 | result = ioctl(fd, IOCTL_GPIOGET, &gpio);
87 | cout << "New GPIO = " << hex << gpio << ", result = " << result << endl;
88 |
89 | close(fd);
90 |
91 | return 0;
92 | }
93 |
--------------------------------------------------------------------------------
/DeepLearning/dataset/datasetspliter.c:
--------------------------------------------------------------------------------
1 | #include
2 | #include
3 | #include
4 | #include
5 |
6 | #define MAX_LINES 1000 // máximo de linhas esperadas no CSV
7 | #define MAX_LINE_LEN 512 // tamanho máximo de cada linha
8 |
9 | // Função para embaralhar as linhas
10 | void shuffle_lines(char *lines[], int count) {
11 | srand((unsigned int)time(NULL));
12 | for (int i = count - 1; i > 0; i--) {
13 | int j = rand() % (i + 1);
14 | char *temp = lines[i];
15 | lines[i] = lines[j];
16 | lines[j] = temp;
17 | }
18 | }
19 |
20 | void split_csv_dataset(const char *input_file,
21 | const char *train_file,
22 | const char *eval_file,
23 | double eval_ratio) {
24 | FILE *in = fopen(input_file, "r");
25 | if (!in) {
26 | printf("❌ Erro ao abrir %s\n", input_file);
27 | return;
28 | }
29 |
30 | char *lines[MAX_LINES];
31 | int count = 0;
32 | char buffer[MAX_LINE_LEN];
33 |
34 | // Lê todas as linhas do arquivo CSV
35 | while (fgets(buffer, sizeof(buffer), in)) {
36 | buffer[strcspn(buffer, "\r\n")] = 0; // remove \n
37 | if (strlen(buffer) == 0)
38 | continue;
39 | lines[count] = strdup(buffer);
40 | count++;
41 | if (count >= MAX_LINES) break;
42 | }
43 | fclose(in);
44 |
45 | if (count == 0) {
46 | printf("⚠️ Nenhuma linha encontrada.\n");
47 | return;
48 | }
49 |
50 | // Embaralha as linhas
51 | shuffle_lines(lines, count);
52 |
53 | // Calcula tamanhos
54 | int eval_size = (int)(count * eval_ratio);
55 | int train_size = count - eval_size;
56 |
57 | FILE *train = fopen(train_file, "w");
58 | FILE *eval = fopen(eval_file, "w");
59 |
60 | if (!train || !eval) {
61 | printf("❌ Erro ao criar arquivos de saída.\n");
62 | if (train) fclose(train);
63 | if (eval) fclose(eval);
64 | return;
65 | }
66 |
67 | // Escreve as linhas embaralhadas
68 | for (int i = 0; i < count; i++) {
69 | FILE *target = (i < train_size) ? train : eval;
70 | fprintf(target, "%s\n", lines[i]);
71 | free(lines[i]);
72 | }
73 |
74 | fclose(train);
75 | fclose(eval);
76 |
77 | printf("✅ Dataset dividido com sucesso!\n");
78 | printf(" - %s: %d linhas (treino)\n", train_file, train_size);
79 | printf(" - %s: %d linhas (avaliação)\n", eval_file, eval_size);
80 | }
81 |
82 | int main() {
83 | split_csv_dataset("wine/wine.csv",
84 | "wine/datasettraining.csv",
85 | "wine/datasetevaluation.csv",
86 | 0.20); // 20% para avaliação
87 | return 0;
88 | }
89 |
--------------------------------------------------------------------------------
/FederatedLearningServer/lib/federatedlearning.h:
--------------------------------------------------------------------------------
1 | #ifndef FEDERATEDLEARNING_H
2 | #define FEDERATEDLEARNING_H
3 |
4 | #include "../lib/cJSON.h"
5 | #include
6 |
7 | //activation function
8 | #define PERCEPTRON 1
9 | #define RELU 2
10 | #define SIGMOID 3
11 |
12 | //output activation function
13 | #define SOFTMAX 4
14 |
15 | //loss function
16 | #define MINIMAL_MEAN_SQUARE 1
17 | #define CATEGORICAL_CROSS_ENTROPY 2
18 |
19 | //regularization
20 | #define NONE_REGULARIZATION 0
21 | #define L1 1
22 | #define L2 2
23 |
24 | //weight value
25 | #define WEIGHT_VALUE_ZERO 0
26 | #define WEIGHT_VALUE_RANDOM 1
27 | #define WEIGHT_VALUE_HALF 2
28 |
29 | //////////
30 |
31 | typedef struct Weight {
32 | float weight;
33 | struct Weight * previousweight, * nextweight;
34 | }Weight;
35 |
36 | typedef struct Neuron {
37 | char neurontype[20];
38 | int weights;
39 | float activationfunctionvalue;
40 | float bias;
41 | struct Weight * firstweight, * lastweight;
42 | struct Neuron * nextneuron, * previousneuron;
43 | }Neuron;
44 |
45 | typedef struct Layer {
46 | int activationfunctiontype;
47 | int neurons;
48 | struct Neuron * firstneuron, * lastneuron;
49 | struct Layer * previouslayer, * nextlayer;
50 | }Layer;
51 |
52 | typedef struct NeuralNetwork {
53 | int epoch;
54 | float alpha;
55 | int regularization;
56 | float lambda;
57 | int percentualtraining;
58 | int lossfunctiontype;
59 | int layers;
60 | struct Layer * firstlayer, * lastlayer;
61 | }NeuralNetwork;
62 |
63 | //////////
64 |
65 | typedef struct ClientNode{
66 | char ip_id[15];
67 | int interaction;
68 | struct ClientNode *previousclientnode, *nextclientnode;
69 | }ClientNode;
70 |
71 | typedef struct NodeControl{
72 | int currentinteraction;
73 | int interactioncycle;
74 | int clientnodes;
75 | int clientnodesregistered;
76 | NeuralNetwork *neuralnetwork;
77 | struct ClientNode *firstclientnode, *lastclientnode;
78 | }NodeControl;
79 |
80 | //////////
81 |
82 | typedef struct FederatedLearning{
83 | int globalmodelstatus;
84 | int trainingscounter;
85 | NeuralNetwork *neuralnetwork;
86 | NodeControl *nodecontrol;
87 | }FederatedLearning;
88 |
89 | //////////
90 |
91 | typedef struct LayerConfig{
92 | struct LayerConfig *first, *next;
93 | int neurons;
94 | int activationfunctiontype;
95 | }LayerConfig;
96 |
97 | //Methods
98 | FederatedLearning *getFederatedLearningInstance();
99 | void PrintNeuralNeuralNetwork(NeuralNetwork * neuralnetwork);
100 | void setFederatedLearningGlobalModel();
101 | void AggregationModel(FederatedLearning * clientmodel);
102 | void PerformanceMetrics(NeuralNetwork * neuralnetwork,int PercentualEvaluation,float Threshold);
103 | #endif
104 |
--------------------------------------------------------------------------------
/FederatedLearningFPGA/miscellaneous.v:
--------------------------------------------------------------------------------
1 | module multiplexer_parametrized #(
2 | parameter NUM_INPUTS = 4,
3 | parameter DATA_WIDTH = 32
4 | )(
5 | input [NUM_INPUTS*DATA_WIDTH-1:0] in,
6 | input [$clog2(NUM_INPUTS)-1:0] sel,
7 | output reg [DATA_WIDTH-1:0] out
8 | );
9 |
10 | always @(*) begin
11 | out = in[sel*DATA_WIDTH +: DATA_WIDTH];
12 | end
13 |
14 | endmodule
15 |
16 | module register(
17 | input clock,
18 | input reset,
19 | input [31:0] data,
20 | output reg [31:0] register
21 | );
22 |
23 | always @(posedge clock) begin
24 | if (reset) begin
25 | register <= 32'b0;
26 | end else begin
27 | register <= data;
28 | end
29 | end
30 |
31 | endmodule
32 |
33 | module memory_parametrized #(
34 | parameter WORDS = 256
35 | )(
36 | input clock,
37 | input reset,
38 | input write_enable,
39 | input [31:0] write_data,
40 | input [$clog2(WORDS)-1:0] address,
41 | output reg [31:0] read_data
42 | );
43 |
44 | reg [31:0] mem [0:WORDS-1];
45 |
46 | integer i;
47 |
48 | initial begin
49 | for (i = 0; i < WORDS; i = i + 1) begin
50 | mem[i] <= 32'h3f000000;
51 | end
52 | end
53 |
54 | always @(posedge clock) begin
55 | if (reset) begin
56 | for (i = 0; i < WORDS; i = i + 1) begin
57 | mem[i] <= 32'b0;
58 | end
59 | end else if (write_enable) begin
60 | mem[address] <= write_data;
61 | end
62 | end
63 |
64 | always @(address) begin
65 | if (!write_enable) begin
66 | read_data <= mem[address];
67 | end
68 | end
69 |
70 | endmodule
71 |
72 |
73 | module bin_to_7seg (
74 | input [3:0] binary,
75 | output reg [6:0] seg
76 | );
77 |
78 | always @(*) begin
79 | case (binary)
80 | 4'b0000: seg = 7'b1000000; // 0
81 | 4'b0001: seg = 7'b1111001; // 1
82 | 4'b0010: seg = 7'b0100100; // 2
83 | 4'b0011: seg = 7'b0110000; // 3
84 | 4'b0100: seg = 7'b0011001; // 4
85 | 4'b0101: seg = 7'b0010010; // 5
86 | 4'b0110: seg = 7'b0000010; // 6
87 | 4'b0111: seg = 7'b1111000; // 7
88 | 4'b1000: seg = 7'b0000000; // 8
89 | 4'b1001: seg = 7'b0010000; // 9
90 | 4'b1010: seg = 7'b0001000; // A
91 | 4'b1011: seg = 7'b0000011; // b
92 | 4'b1100: seg = 7'b1000110; // C
93 | 4'b1101: seg = 7'b0100001; // d
94 | 4'b1110: seg = 7'b0000110; // E
95 | 4'b1111: seg = 7'b0001110; // F
96 | default: seg = 7'b1111111; // clean display
97 | endcase
98 | end
99 |
100 | endmodule
--------------------------------------------------------------------------------
/DeepLearning/dataset/winetocsv.c:
--------------------------------------------------------------------------------
1 | #include
2 | #include
3 | #include
4 | #include
5 |
6 | #define MAX_LINE_LEN 1024
7 | #define EXPECTED_TOKENS 14 // 1 classe + 13 features
8 |
9 | /* remove espaços no início/fim */
10 | char *trim_inplace(char *s) {
11 | char *end;
12 | while (*s && isspace((unsigned char)*s)) s++;
13 | if (*s == 0) return s;
14 | end = s + strlen(s) - 1;
15 | while (end > s && isspace((unsigned char)*end)) end--;
16 | end[1] = '\0';
17 | return s;
18 | }
19 |
20 | int main(void) {
21 | FILE *in = fopen("wine/wine.data", "r");
22 | FILE *out = fopen("wine/wine.csv", "w");
23 | if (!in || !out) {
24 | fprintf(stderr, "Erro ao abrir arquivo(s).\n");
25 | if (in) fclose(in);
26 | if (out) fclose(out);
27 | return 1;
28 | }
29 |
30 | char line[MAX_LINE_LEN];
31 | int total = 0;
32 | int skipped = 0;
33 |
34 | // Cabeçalho
35 | fprintf(out, "index,");
36 | for (int i = 1; i <= 13; ++i) {
37 | fprintf(out, "feature%d,", i);
38 | }
39 | fprintf(out, "class1,class2,class3\n");
40 |
41 | while (fgets(line, sizeof(line), in)) {
42 | // Remove quebra de linha
43 | line[strcspn(line, "\r\n")] = '\0';
44 |
45 | // Ignora linhas vazias
46 | char *p = line;
47 | while (*p && isspace((unsigned char)*p)) p++;
48 | if (*p == '\0') continue;
49 |
50 | // Tokeniza por vírgula
51 | char *tokens[20];
52 | int nt = 0;
53 | char *tok = strtok(line, ",");
54 | while (tok && nt < 20) {
55 | tokens[nt++] = trim_inplace(tok);
56 | tok = strtok(NULL, ",");
57 | }
58 |
59 | // Verifica se tem número esperado de colunas
60 | if (nt < EXPECTED_TOKENS) {
61 | fprintf(stderr, "Linha ignorada (colunas=%d < %d): \"%s\"\n", nt, EXPECTED_TOKENS, p);
62 | skipped++;
63 | continue;
64 | }
65 |
66 | // Classe
67 | int classe = atoi(tokens[0]);
68 | if (classe < 1 || classe > 3) {
69 | fprintf(stderr, "Linha ignorada (classe inválida=%d): \"%s\"\n", classe, p);
70 | skipped++;
71 | continue;
72 | }
73 |
74 | // Índice começa em 1
75 | fprintf(out, "%d,", total + 1);
76 |
77 | // Features (tokens[1..13])
78 | fprintf(out, "%s", tokens[1]);
79 | for (int i = 2; i <= 13; ++i) {
80 | fprintf(out, ",%s", tokens[i]);
81 | }
82 |
83 | // One-hot
84 | if (classe == 1) fprintf(out, ",1,0,0\n");
85 | else if (classe == 2) fprintf(out, ",0,1,0\n");
86 | else fprintf(out, ",0,0,1\n");
87 |
88 | total++;
89 | }
90 |
91 | fclose(in);
92 | fclose(out);
93 |
94 | printf("Concluído: %d linhas processadas, %d ignoradas.\n", total, skipped);
95 | printf("Arquivo gerado: wine.csv\n");
96 | return 0;
97 | }
98 |
--------------------------------------------------------------------------------
/FederatedLearningFPGA/db/NeuralNetworkFPGA.asm.qmsg:
--------------------------------------------------------------------------------
1 | { "Info" "IQEXE_SEPARATOR" "" "*******************************************************************" { } { } 3 0 "*******************************************************************" 0 0 "Design Software" 0 -1 1734066803713 ""}
2 | { "Info" "IQEXE_START_BANNER_PRODUCT" "Assembler Quartus Prime " "Running Quartus Prime Assembler" { { "Info" "IQEXE_START_BANNER_VERSION" "Version 23.1std.1 Build 993 05/14/2024 SC Lite Edition " "Version 23.1std.1 Build 993 05/14/2024 SC Lite Edition" { } { } 0 0 "%1!s!" 0 0 "Design Software" 0 -1 1734066803713 ""} { "Info" "IQEXE_START_BANNER_TIME" "Fri Dec 13 02:13:23 2024 " "Processing started: Fri Dec 13 02:13:23 2024" { } { } 0 0 "Processing started: %1!s!" 0 0 "Design Software" 0 -1 1734066803713 ""} } { } 4 0 "Running %2!s! %1!s!" 0 0 "Assembler" 0 -1 1734066803713 ""}
3 | { "Info" "IQEXE_START_BANNER_COMMANDLINE" "quartus_asm --read_settings_files=off --write_settings_files=off NeuralNetworkFPGA -c NeuralNetworkFPGA " "Command: quartus_asm --read_settings_files=off --write_settings_files=off NeuralNetworkFPGA -c NeuralNetworkFPGA" { } { } 0 0 "Command: %1!s!" 0 0 "Assembler" 0 -1 1734066803714 ""}
4 | { "Warning" "WQCU_PARALLEL_USER_SHOULD_SPECIFY_NUM_PROC" "" "Number of processors has not been specified which may cause overloading on shared machines. Set the global assignment NUM_PARALLEL_PROCESSORS in your QSF to an appropriate value for best performance." { } { } 0 18236 "Number of processors has not been specified which may cause overloading on shared machines. Set the global assignment NUM_PARALLEL_PROCESSORS in your QSF to an appropriate value for best performance." 0 0 "Assembler" 0 -1 1734066804096 ""}
5 | { "Info" "IASM_ASM_GENERATING_POWER_DATA" "" "Writing out detailed assembly data for power analysis" { } { } 0 115031 "Writing out detailed assembly data for power analysis" 0 0 "Assembler" 0 -1 1734066806608 ""}
6 | { "Info" "IASM_ASM_GENERATING_PROGRAMMING_FILES" "" "Assembler is generating device programming files" { } { } 0 115030 "Assembler is generating device programming files" 0 0 "Assembler" 0 -1 1734066806741 ""}
7 | { "Info" "IQEXE_ERROR_COUNT" "Assembler 0 s 1 Quartus Prime " "Quartus Prime Assembler was successful. 0 errors, 1 warning" { { "Info" "IQEXE_END_PEAK_VSIZE_MEMORY" "4706 " "Peak virtual memory: 4706 megabytes" { } { } 0 0 "Peak virtual memory: %1!s! megabytes" 0 0 "Design Software" 0 -1 1734066807028 ""} { "Info" "IQEXE_END_BANNER_TIME" "Fri Dec 13 02:13:27 2024 " "Processing ended: Fri Dec 13 02:13:27 2024" { } { } 0 0 "Processing ended: %1!s!" 0 0 "Design Software" 0 -1 1734066807028 ""} { "Info" "IQEXE_ELAPSED_TIME" "00:00:04 " "Elapsed time: 00:00:04" { } { } 0 0 "Elapsed time: %1!s!" 0 0 "Design Software" 0 -1 1734066807028 ""} { "Info" "IQEXE_ELAPSED_CPU_TIME" "00:00:03 " "Total CPU time (on all processors): 00:00:03" { } { } 0 0 "Total CPU time (on all processors): %1!s!" 0 0 "Design Software" 0 -1 1734066807028 ""} } { } 0 0 "%6!s! %1!s! was successful. %2!d! error%3!s!, %4!d! warning%5!s!" 0 0 "Assembler" 0 -1 1734066807028 ""}
8 |
--------------------------------------------------------------------------------
/FederatedLearningFPGA/db/NeuralNetworkFPGA.eda.qmsg:
--------------------------------------------------------------------------------
1 | { "Info" "IQEXE_SEPARATOR" "" "*******************************************************************" { } { } 3 0 "*******************************************************************" 0 0 "Design Software" 0 -1 1734066811856 ""}
2 | { "Info" "IQEXE_START_BANNER_PRODUCT" "EDA Netlist Writer Quartus Prime " "Running Quartus Prime EDA Netlist Writer" { { "Info" "IQEXE_START_BANNER_VERSION" "Version 23.1std.1 Build 993 05/14/2024 SC Lite Edition " "Version 23.1std.1 Build 993 05/14/2024 SC Lite Edition" { } { } 0 0 "%1!s!" 0 0 "Design Software" 0 -1 1734066811857 ""} { "Info" "IQEXE_START_BANNER_TIME" "Fri Dec 13 02:13:31 2024 " "Processing started: Fri Dec 13 02:13:31 2024" { } { } 0 0 "Processing started: %1!s!" 0 0 "Design Software" 0 -1 1734066811857 ""} } { } 4 0 "Running %2!s! %1!s!" 0 0 "EDA Netlist Writer" 0 -1 1734066811857 ""}
3 | { "Info" "IQEXE_START_BANNER_COMMANDLINE" "quartus_eda --read_settings_files=off --write_settings_files=off NeuralNetworkFPGA -c NeuralNetworkFPGA " "Command: quartus_eda --read_settings_files=off --write_settings_files=off NeuralNetworkFPGA -c NeuralNetworkFPGA" { } { } 0 0 "Command: %1!s!" 0 0 "EDA Netlist Writer" 0 -1 1734066811857 ""}
4 | { "Warning" "WQCU_PARALLEL_USER_SHOULD_SPECIFY_NUM_PROC" "" "Number of processors has not been specified which may cause overloading on shared machines. Set the global assignment NUM_PARALLEL_PROCESSORS in your QSF to an appropriate value for best performance." { } { } 0 18236 "Number of processors has not been specified which may cause overloading on shared machines. Set the global assignment NUM_PARALLEL_PROCESSORS in your QSF to an appropriate value for best performance." 0 0 "EDA Netlist Writer" 0 -1 1734066812405 ""}
5 | { "Info" "IWSC_DONE_HDL_GENERATION" "NeuralNetworkFPGA.vo C:/Development/FederatedEdgeComputing/FederatedLearningFPGA/simulation/questa/ simulation " "Generated file NeuralNetworkFPGA.vo in folder \"C:/Development/FederatedEdgeComputing/FederatedLearningFPGA/simulation/questa/\" for EDA simulation tool" { } { } 0 204019 "Generated file %1!s! in folder \"%2!s!\" for EDA %3!s! tool" 0 0 "EDA Netlist Writer" 0 -1 1734066812476 ""}
6 | { "Info" "IQEXE_ERROR_COUNT" "EDA Netlist Writer 0 s 1 Quartus Prime " "Quartus Prime EDA Netlist Writer was successful. 0 errors, 1 warning" { { "Info" "IQEXE_END_PEAK_VSIZE_MEMORY" "4652 " "Peak virtual memory: 4652 megabytes" { } { } 0 0 "Peak virtual memory: %1!s! megabytes" 0 0 "Design Software" 0 -1 1734066812505 ""} { "Info" "IQEXE_END_BANNER_TIME" "Fri Dec 13 02:13:32 2024 " "Processing ended: Fri Dec 13 02:13:32 2024" { } { } 0 0 "Processing ended: %1!s!" 0 0 "Design Software" 0 -1 1734066812505 ""} { "Info" "IQEXE_ELAPSED_TIME" "00:00:01 " "Elapsed time: 00:00:01" { } { } 0 0 "Elapsed time: %1!s!" 0 0 "Design Software" 0 -1 1734066812505 ""} { "Info" "IQEXE_ELAPSED_CPU_TIME" "00:00:01 " "Total CPU time (on all processors): 00:00:01" { } { } 0 0 "Total CPU time (on all processors): %1!s!" 0 0 "Design Software" 0 -1 1734066812505 ""} } { } 0 0 "%6!s! %1!s! was successful. %2!d! error%3!s!, %4!d! warning%5!s!" 0 0 "EDA Netlist Writer" 0 -1 1734066812505 ""}
7 |
--------------------------------------------------------------------------------
/FederatedLearningFPGA/testbench/tb_miscellaneous/tb_memory_32bit.v:
--------------------------------------------------------------------------------
1 | `timescale 1ns / 1ps
2 |
3 | module tb_memory_32bit;
4 |
5 | // Test parameters
6 | parameter MEMORY_DEPTH = 16; // Small memory for testing
7 | parameter ADDR_WIDTH = $clog2(MEMORY_DEPTH);
8 |
9 | // Test signals
10 | reg clock;
11 | reg reset;
12 | reg write_enable;
13 | reg [ADDR_WIDTH-1:0] address;
14 | reg [31:0] write_data;
15 | wire [31:0] read_data;
16 |
17 | // Instantiate the memory module
18 | memory_32bit #(
19 | .MEMORY_DEPTH(MEMORY_DEPTH)
20 | ) uut (
21 | .clock(clock),
22 | .reset(reset),
23 | .write_enable(write_enable),
24 | .address(address),
25 | .write_data(write_data),
26 | .read_data(read_data)
27 | );
28 |
29 | // Clock generation
30 | initial begin
31 | clock = 0;
32 | forever #5 clock = ~clock; // 100MHz clock (10ns period)
33 | end
34 |
35 | // Test stimulus
36 | initial begin
37 | // Initialize signals
38 | reset = 1;
39 | write_enable = 0;
40 | address = 0;
41 | write_data = 32'h00000000;
42 |
43 | // Test 1: Reset functionality
44 | #20;
45 | reset = 0;
46 | #10;
47 |
48 | // Test 2: Write operations
49 | write_enable = 1;
50 | address = 0; write_data = 32'hAABBCCDD;
51 | #10;
52 | address = 1; write_data = 32'h11223344;
53 | #10;
54 | address = 2; write_data = 32'hDEADBEEF;
55 | #10;
56 | address = 3; write_data = 32'hCAFEBABE;
57 | #10;
58 |
59 | // Test 3: Read operations
60 | write_enable = 0;
61 | address = 0;
62 | #10;
63 | address = 1;
64 | #10;
65 | address = 2;
66 | #10;
67 | address = 3;
68 | #10;
69 |
70 | // Test 4: Write to different addresses
71 | write_enable = 1;
72 | address = 15; write_data = 32'hFEDCBA98;
73 | #10;
74 | address = 8; write_data = 32'h87654321;
75 | #10;
76 |
77 | // Test 5: Read from newly written addresses
78 | write_enable = 0;
79 | address = 15;
80 | #10;
81 | address = 8;
82 | #10;
83 |
84 | // Test 6: Reset during operation
85 | reset = 1;
86 | #10;
87 | reset = 0;
88 | #10;
89 |
90 | // Test 7: Read after reset (should be all zeros)
91 | address = 0;
92 | #10;
93 | address = 1;
94 | #10;
95 | address = 15;
96 | #10;
97 |
98 | // End simulation
99 | #20 $finish;
100 | end
101 |
102 | // Monitor and display results
103 | initial begin
104 | $monitor("Time: %0t | Reset: %b | Write_Enable: %b | Address: %0d | Write_Data: %h | Read_Data: %h",
105 | $time, reset, write_enable, address, write_data, read_data);
106 | end
107 |
108 | // Additional verification
109 | initial begin
110 | $display("=== 32-bit Memory Testbench Started ===");
111 | $display("Memory Depth: %0d words", MEMORY_DEPTH);
112 | $display("Address Width: %0d bits", ADDR_WIDTH);
113 | $display("=====================================");
114 | end
115 |
116 | endmodule
--------------------------------------------------------------------------------
/DeepLearning/dataset/wine/wine.names:
--------------------------------------------------------------------------------
1 | 1. Title of Database: Wine recognition data
2 | Updated Sept 21, 1998 by C.Blake : Added attribute information
3 |
4 | 2. Sources:
5 | (a) Forina, M. et al, PARVUS - An Extendible Package for Data
6 | Exploration, Classification and Correlation. Institute of Pharmaceutical
7 | and Food Analysis and Technologies, Via Brigata Salerno,
8 | 16147 Genoa, Italy.
9 |
10 | (b) Stefan Aeberhard, email: stefan@coral.cs.jcu.edu.au
11 | (c) July 1991
12 | 3. Past Usage:
13 |
14 | (1)
15 | S. Aeberhard, D. Coomans and O. de Vel,
16 | Comparison of Classifiers in High Dimensional Settings,
17 | Tech. Rep. no. 92-02, (1992), Dept. of Computer Science and Dept. of
18 | Mathematics and Statistics, James Cook University of North Queensland.
19 | (Also submitted to Technometrics).
20 |
21 | The data was used with many others for comparing various
22 | classifiers. The classes are separable, though only RDA
23 | has achieved 100% correct classification.
24 | (RDA : 100%, QDA 99.4%, LDA 98.9%, 1NN 96.1% (z-transformed data))
25 | (All results using the leave-one-out technique)
26 |
27 | In a classification context, this is a well posed problem
28 | with "well behaved" class structures. A good data set
29 | for first testing of a new classifier, but not very
30 | challenging.
31 |
32 | (2)
33 | S. Aeberhard, D. Coomans and O. de Vel,
34 | "THE CLASSIFICATION PERFORMANCE OF RDA"
35 | Tech. Rep. no. 92-01, (1992), Dept. of Computer Science and Dept. of
36 | Mathematics and Statistics, James Cook University of North Queensland.
37 | (Also submitted to Journal of Chemometrics).
38 |
39 | Here, the data was used to illustrate the superior performance of
40 | the use of a new appreciation function with RDA.
41 |
42 | 4. Relevant Information:
43 |
44 | -- These data are the results of a chemical analysis of
45 | wines grown in the same region in Italy but derived from three
46 | different cultivars.
47 | The analysis determined the quantities of 13 constituents
48 | found in each of the three types of wines.
49 |
50 | -- I think that the initial data set had around 30 variables, but
51 | for some reason I only have the 13 dimensional version.
52 | I had a list of what the 30 or so variables were, but a.)
53 | I lost it, and b.), I would not know which 13 variables
54 | are included in the set.
55 |
56 | -- The attributes are (dontated by Riccardo Leardi,
57 | riclea@anchem.unige.it )
58 | 1) Alcohol
59 | 2) Malic acid
60 | 3) Ash
61 | 4) Alcalinity of ash
62 | 5) Magnesium
63 | 6) Total phenols
64 | 7) Flavanoids
65 | 8) Nonflavanoid phenols
66 | 9) Proanthocyanins
67 | 10)Color intensity
68 | 11)Hue
69 | 12)OD280/OD315 of diluted wines
70 | 13)Proline
71 |
72 | 5. Number of Instances
73 |
74 | class 1 59
75 | class 2 71
76 | class 3 48
77 |
78 | 6. Number of Attributes
79 |
80 | 13
81 |
82 | 7. For Each Attribute:
83 |
84 | All attributes are continuous
85 |
86 | No statistics available, but suggest to standardise
87 | variables for certain uses (e.g. for us with classifiers
88 | which are NOT scale invariant)
89 |
90 | NOTE: 1st attribute is class identifier (1-3)
91 |
92 | 8. Missing Attribute Values:
93 |
94 | None
95 |
96 | 9. Class Distribution: number of instances per class
97 |
98 | class 1 59
99 | class 2 71
100 | class 3 48
101 |
--------------------------------------------------------------------------------
/FederatedLearningFPGA/testbench/tb_neuron/tb_relu.v:
--------------------------------------------------------------------------------
1 | `timescale 1ns/1ns
2 |
3 | module tb_relu;
4 |
5 | reg [31:0] Z;
6 | wire [31:0] a;
7 |
8 | // Instantiate the ReLU module
9 | relu uut (
10 | .Z(Z),
11 | .a(a)
12 | );
13 |
14 | // Test cases
15 | initial begin
16 | $display("=== ReLU Activation Function Testbench ===");
17 | $display("Time | Input (Z) | Output (a) | Expected | Status");
18 | $display("-----|-----------|------------|----------|--------");
19 |
20 | // Test 1: Positive number
21 | #10 Z = 32'h40400000; // 3.0
22 | #5 $display("%4t | %h | %h | %h | %s", $time, Z, a, 32'h40400000,
23 | (a == 32'h40400000) ? "PASS" : "FAIL");
24 |
25 | // Test 2: Negative number
26 | #10 Z = 32'hC0400000; // -3.0
27 | #5 $display("%4t | %h | %h | %h | %s", $time, Z, a, 32'h00000000,
28 | (a == 32'h00000000) ? "PASS" : "FAIL");
29 |
30 | // Test 3: Zero
31 | #10 Z = 32'h00000000; // 0.0
32 | #5 $display("%4t | %h | %h | %h | %s", $time, Z, a, 32'h00000000,
33 | (a == 32'h00000000) ? "PASS" : "FAIL");
34 |
35 | // Test 4: Small positive number
36 | #10 Z = 32'h3F800000; // 1.0
37 | #5 $display("%4t | %h | %h | %h | %s", $time, Z, a, 32'h3F800000,
38 | (a == 32'h3F800000) ? "PASS" : "FAIL");
39 |
40 | // Test 5: Small negative number
41 | #10 Z = 32'hBF800000; // -1.0
42 | #5 $display("%4t | %h | %h | %h | %s", $time, Z, a, 32'h00000000,
43 | (a == 32'h00000000) ? "PASS" : "FAIL");
44 |
45 | // Test 6: Large positive number
46 | #10 Z = 32'h41200000; // 10.0
47 | #5 $display("%4t | %h | %h | %h | %s", $time, Z, a, 32'h41200000,
48 | (a == 32'h41200000) ? "PASS" : "FAIL");
49 |
50 | // Test 7: Large negative number
51 | #10 Z = 32'hC1200000; // -10.0
52 | #5 $display("%4t | %h | %h | %h | %s", $time, Z, a, 32'h00000000,
53 | (a == 32'h00000000) ? "PASS" : "FAIL");
54 |
55 | // Test 8: Very small positive number
56 | #10 Z = 32'h3A83126F; // 0.001
57 | #5 $display("%4t | %h | %h | %h | %s", $time, Z, a, 32'h3A83126F,
58 | (a == 32'h3A83126F) ? "PASS" : "FAIL");
59 |
60 | // Test 9: Very small negative number
61 | #10 Z = 32'hBA83126F; // -0.001
62 | #5 $display("%4t | %h | %h | %h | %s", $time, Z, a, 32'h00000000,
63 | (a == 32'h00000000) ? "PASS" : "FAIL");
64 |
65 | // Test 10: Positive infinity
66 | #10 Z = 32'h7F800000; // +inf
67 | #5 $display("%4t | %h | %h | %h | %s", $time, Z, a, 32'h7F800000,
68 | (a == 32'h7F800000) ? "PASS" : "FAIL");
69 |
70 | // Test 11: Negative infinity
71 | #10 Z = 32'hFF800000; // -inf
72 | #5 $display("%4t | %h | %h | %h | %s", $time, Z, a, 32'h00000000,
73 | (a == 32'h00000000) ? "PASS" : "FAIL");
74 |
75 | // Test 12: NaN
76 | #10 Z = 32'h7FFFFFFF; // NaN
77 | #5 $display("%4t | %h | %h | %h | %s", $time, Z, a, 32'h7FFFFFFF,
78 | (a == 32'h7FFFFFFF) ? "PASS" : "FAIL");
79 |
80 | $display("=== ReLU Test Complete ===");
81 | $finish;
82 | end
83 |
84 | // Monitor changes
85 | initial begin
86 | $monitor("Time: %t | Z: %h | a: %h", $time, Z, a);
87 | end
88 |
89 | endmodule
--------------------------------------------------------------------------------
/FederatedLearningESP32/data/dataset.csv:
--------------------------------------------------------------------------------
1 | 1,5.1,3.5,1.4,0.2,1,0,0
2 | 143,5.8,2.7,5.1,1.9,0,0,1
3 | 2,4.9,3.0,1.4,0.2,1,0,0
4 | 29,5.2,3.4,1.4,0.2,1,0,0
5 | 79,6.0,2.9,4.5,1.5,0,1,0
6 | 15,5.8,4.0,1.2,0.2,1,0,0
7 | 38,4.9,3.1,1.5,0.1,1,0,0
8 | 148,6.5,3.0,5.2,2.0,0,0,1
9 | 42,4.5,2.3,1.3,0.3,1,0,0
10 | 63,6.0,2.2,4.0,1.0,0,1,0
11 | 134,6.3,2.8,5.1,1.5,0,0,1
12 | 32,5.4,3.4,1.5,0.4,1,0,0
13 | 88,6.3,2.3,4.4,1.3,0,1,0
14 | 71,5.9,3.2,4.8,1.8,0,1,0
15 | 106,7.6,3.0,6.6,2.1,0,0,1
16 | 41,5.0,3.5,1.3,0.3,1,0,0
17 | 150,5.9,3.0,5.1,1.8,0,0,1
18 | 17,5.4,3.9,1.3,0.4,1,0,0
19 | 128,6.1,3.0,4.9,1.8,0,0,1
20 | 30,4.7,3.2,1.6,0.2,1,0,0
21 | 110,7.2,3.6,6.1,2.5,0,0,1
22 | 125,6.7,3.3,5.7,2.1,0,0,1
23 | 100,5.7,2.8,4.1,1.3,0,1,0
24 | 117,6.5,3.0,5.5,1.8,0,0,1
25 | 40,5.1,3.4,1.5,0.2,1,0,0
26 | 116,6.4,3.2,5.3,2.3,0,0,1
27 | 28,5.2,3.5,1.5,0.2,1,0,0
28 | 70,5.6,2.5,3.9,1.1,0,1,0
29 | 114,5.7,2.5,5.0,2.0,0,0,1
30 | 91,5.5,2.6,4.4,1.2,0,1,0
31 | 98,6.2,2.9,4.3,1.3,0,1,0
32 | 144,6.8,3.2,5.9,2.3,0,0,1
33 | 66,6.7,3.1,4.4,1.4,0,1,0
34 | 7,4.6,3.4,1.4,0.3,1,0,0
35 | 113,6.8,3.0,5.5,2.1,0,0,1
36 | 59,6.6,2.9,4.6,1.3,0,1,0
37 | 10,4.9,3.1,1.5,0.1,1,0,0
38 | 126,7.2,3.2,6.0,1.8,0,0,1
39 | 56,5.7,2.8,4.5,1.3,0,1,0
40 | 55,6.5,2.8,4.6,1.5,0,1,0
41 | 92,6.1,3.0,4.6,1.4,0,1,0
42 | 9,4.4,2.9,1.4,0.2,1,0,0
43 | 35,4.9,3.1,1.5,0.1,1,0,0
44 | 101,6.3,3.3,6.0,2.5,0,0,1
45 | 68,5.8,2.7,4.1,1.0,0,1,0
46 | 49,5.3,3.7,1.5,0.2,1,0,0
47 | 37,5.5,3.5,1.3,0.2,1,0,0
48 | 89,5.6,3.0,4.1,1.3,0,1,0
49 | 44,5.0,3.5,1.6,0.6,1,0,0
50 | 60,5.2,2.7,3.9,1.4,0,1,0
51 | 115,5.8,2.8,5.1,2.4,0,0,1
52 | 23,4.6,3.6,1.0,0.2,1,0,0
53 | 136,7.7,3.0,6.1,2.3,0,0,1
54 | 13,4.8,3.0,1.4,0.1,1,0,0
55 | 45,5.1,3.8,1.9,0.4,1,0,0
56 | 85,5.4,3.0,4.5,1.5,0,1,0
57 | 46,4.8,3.0,1.4,0.3,1,0,0
58 | 94,5.0,2.3,3.3,1.0,0,1,0
59 | 132,7.9,3.8,6.4,2.0,0,0,1
60 | 93,5.8,2.6,4.0,1.2,0,1,0
61 | 74,6.1,2.8,4.7,1.2,0,1,0
62 | 102,5.8,2.7,5.1,1.9,0,0,1
63 | 50,5.0,3.3,1.4,0.2,1,0,0
64 | 33,5.2,4.1,1.5,0.1,1,0,0
65 | 90,5.5,2.5,4.0,1.3,0,1,0
66 | 146,6.7,3.0,5.2,2.3,0,0,1
67 | 3,4.7,3.2,1.3,0.2,1,0,0
68 | 31,4.8,3.1,1.6,0.2,1,0,0
69 | 127,6.2,2.8,4.8,1.8,0,0,1
70 | 12,4.8,3.4,1.6,0.2,1,0,0
71 | 57,6.3,3.3,4.7,1.6,0,1,0
72 | 95,5.6,2.7,4.2,1.3,0,1,0
73 | 53,6.9,3.1,4.9,1.5,0,1,0
74 | 118,7.7,3.8,6.7,2.2,0,0,1
75 | 131,7.4,2.8,6.1,1.9,0,0,1
76 | 104,6.3,2.9,5.6,1.8,0,0,1
77 | 107,4.9,2.5,4.5,1.7,0,0,1
78 | 5,5.0,3.6,1.4,0.2,1,0,0
79 | 130,7.2,3.0,5.8,1.6,0,0,1
80 | 67,5.6,3.0,4.5,1.5,0,1,0
81 | 52,6.4,3.2,4.5,1.5,0,1,0
82 | 48,4.6,3.2,1.4,0.2,1,0,0
83 | 73,6.3,2.5,4.9,1.5,0,1,0
84 | 61,5.0,2.0,3.5,1.0,0,1,0
85 | 96,5.7,3.0,4.2,1.2,0,1,0
86 | 112,6.4,2.7,5.3,1.9,0,0,1
87 | 147,6.3,2.5,5.0,1.9,0,0,1
88 | 54,5.5,2.3,4.0,1.3,0,1,0
89 | 26,5.0,3.0,1.6,0.2,1,0,0
90 | 129,6.4,2.8,5.6,2.1,0,0,1
91 | 20,5.1,3.8,1.5,0.3,1,0,0
92 | 120,6.0,2.2,5.0,1.5,0,0,1
93 | 72,6.1,2.8,4.0,1.3,0,1,0
94 | 8,5.0,3.4,1.5,0.2,1,0,0
95 | 87,6.7,3.1,4.7,1.5,0,1,0
96 | 139,6.0,3.0,4.8,1.8,0,0,1
97 | 109,6.7,2.5,5.8,1.8,0,0,1
98 | 51,7.0,3.2,4.7,1.4,0,1,0
99 | 43,4.4,3.2,1.3,0.2,1,0,0
100 | 119,7.7,2.6,6.9,2.3,0,0,1
101 | 83,5.8,2.7,3.9,1.2,0,1,0
102 | 77,6.8,2.8,4.8,1.4,0,1,0
103 | 105,6.5,3.0,5.8,2.2,0,0,1
104 | 39,4.4,3.0,1.3,0.2,1,0,0
105 | 11,5.4,3.7,1.5,0.2,1,0,0
106 | 99,5.1,2.5,3.0,1.1,0,1,0
107 | 138,6.4,3.1,5.5,1.8,0,0,1
108 | 142,6.9,3.1,5.1,2.3,0,0,1
109 | 111,6.5,3.2,5.1,2.0,0,0,1
110 | 22,5.1,3.7,1.5,0.4,1,0,0
111 | 21,5.4,3.4,1.7,0.2,1,0,0
112 | 4,4.6,3.1,1.5,0.2,1,0,0
113 | 24,5.1,3.3,1.7,0.5,1,0,0
114 | 25,4.8,3.4,1.9,0.2,1,0,0
115 | 84,6.0,2.7,5.1,1.6,0,1,0
116 | 6,5.4,3.9,1.7,0.4,1,0,0
117 | 103,7.1,3.0,5.9,2.1,0,0,1
118 | 14,4.3,3.0,1.1,0.1,1,0,0
119 | 122,5.6,2.8,4.9,2.0,0,0,1
120 | 140,6.9,3.1,5.4,2.1,0,0,1
--------------------------------------------------------------------------------
/DeepLearning/dataset/iris/datasettraining.csv:
--------------------------------------------------------------------------------
1 | 1,5.1,3.5,1.4,0.2,1,0,0
2 | 143,5.8,2.7,5.1,1.9,0,0,1
3 | 2,4.9,3.0,1.4,0.2,1,0,0
4 | 29,5.2,3.4,1.4,0.2,1,0,0
5 | 79,6.0,2.9,4.5,1.5,0,1,0
6 | 15,5.8,4.0,1.2,0.2,1,0,0
7 | 38,4.9,3.1,1.5,0.1,1,0,0
8 | 148,6.5,3.0,5.2,2.0,0,0,1
9 | 42,4.5,2.3,1.3,0.3,1,0,0
10 | 63,6.0,2.2,4.0,1.0,0,1,0
11 | 134,6.3,2.8,5.1,1.5,0,0,1
12 | 32,5.4,3.4,1.5,0.4,1,0,0
13 | 88,6.3,2.3,4.4,1.3,0,1,0
14 | 71,5.9,3.2,4.8,1.8,0,1,0
15 | 106,7.6,3.0,6.6,2.1,0,0,1
16 | 41,5.0,3.5,1.3,0.3,1,0,0
17 | 150,5.9,3.0,5.1,1.8,0,0,1
18 | 17,5.4,3.9,1.3,0.4,1,0,0
19 | 128,6.1,3.0,4.9,1.8,0,0,1
20 | 30,4.7,3.2,1.6,0.2,1,0,0
21 | 110,7.2,3.6,6.1,2.5,0,0,1
22 | 125,6.7,3.3,5.7,2.1,0,0,1
23 | 100,5.7,2.8,4.1,1.3,0,1,0
24 | 117,6.5,3.0,5.5,1.8,0,0,1
25 | 40,5.1,3.4,1.5,0.2,1,0,0
26 | 116,6.4,3.2,5.3,2.3,0,0,1
27 | 28,5.2,3.5,1.5,0.2,1,0,0
28 | 70,5.6,2.5,3.9,1.1,0,1,0
29 | 114,5.7,2.5,5.0,2.0,0,0,1
30 | 91,5.5,2.6,4.4,1.2,0,1,0
31 | 98,6.2,2.9,4.3,1.3,0,1,0
32 | 144,6.8,3.2,5.9,2.3,0,0,1
33 | 66,6.7,3.1,4.4,1.4,0,1,0
34 | 7,4.6,3.4,1.4,0.3,1,0,0
35 | 113,6.8,3.0,5.5,2.1,0,0,1
36 | 59,6.6,2.9,4.6,1.3,0,1,0
37 | 10,4.9,3.1,1.5,0.1,1,0,0
38 | 126,7.2,3.2,6.0,1.8,0,0,1
39 | 56,5.7,2.8,4.5,1.3,0,1,0
40 | 55,6.5,2.8,4.6,1.5,0,1,0
41 | 92,6.1,3.0,4.6,1.4,0,1,0
42 | 9,4.4,2.9,1.4,0.2,1,0,0
43 | 35,4.9,3.1,1.5,0.1,1,0,0
44 | 101,6.3,3.3,6.0,2.5,0,0,1
45 | 68,5.8,2.7,4.1,1.0,0,1,0
46 | 49,5.3,3.7,1.5,0.2,1,0,0
47 | 37,5.5,3.5,1.3,0.2,1,0,0
48 | 89,5.6,3.0,4.1,1.3,0,1,0
49 | 44,5.0,3.5,1.6,0.6,1,0,0
50 | 60,5.2,2.7,3.9,1.4,0,1,0
51 | 115,5.8,2.8,5.1,2.4,0,0,1
52 | 23,4.6,3.6,1.0,0.2,1,0,0
53 | 136,7.7,3.0,6.1,2.3,0,0,1
54 | 13,4.8,3.0,1.4,0.1,1,0,0
55 | 45,5.1,3.8,1.9,0.4,1,0,0
56 | 85,5.4,3.0,4.5,1.5,0,1,0
57 | 46,4.8,3.0,1.4,0.3,1,0,0
58 | 94,5.0,2.3,3.3,1.0,0,1,0
59 | 132,7.9,3.8,6.4,2.0,0,0,1
60 | 93,5.8,2.6,4.0,1.2,0,1,0
61 | 74,6.1,2.8,4.7,1.2,0,1,0
62 | 102,5.8,2.7,5.1,1.9,0,0,1
63 | 50,5.0,3.3,1.4,0.2,1,0,0
64 | 33,5.2,4.1,1.5,0.1,1,0,0
65 | 90,5.5,2.5,4.0,1.3,0,1,0
66 | 146,6.7,3.0,5.2,2.3,0,0,1
67 | 3,4.7,3.2,1.3,0.2,1,0,0
68 | 31,4.8,3.1,1.6,0.2,1,0,0
69 | 127,6.2,2.8,4.8,1.8,0,0,1
70 | 12,4.8,3.4,1.6,0.2,1,0,0
71 | 57,6.3,3.3,4.7,1.6,0,1,0
72 | 95,5.6,2.7,4.2,1.3,0,1,0
73 | 53,6.9,3.1,4.9,1.5,0,1,0
74 | 118,7.7,3.8,6.7,2.2,0,0,1
75 | 131,7.4,2.8,6.1,1.9,0,0,1
76 | 104,6.3,2.9,5.6,1.8,0,0,1
77 | 107,4.9,2.5,4.5,1.7,0,0,1
78 | 5,5.0,3.6,1.4,0.2,1,0,0
79 | 130,7.2,3.0,5.8,1.6,0,0,1
80 | 67,5.6,3.0,4.5,1.5,0,1,0
81 | 52,6.4,3.2,4.5,1.5,0,1,0
82 | 48,4.6,3.2,1.4,0.2,1,0,0
83 | 73,6.3,2.5,4.9,1.5,0,1,0
84 | 61,5.0,2.0,3.5,1.0,0,1,0
85 | 96,5.7,3.0,4.2,1.2,0,1,0
86 | 112,6.4,2.7,5.3,1.9,0,0,1
87 | 147,6.3,2.5,5.0,1.9,0,0,1
88 | 54,5.5,2.3,4.0,1.3,0,1,0
89 | 26,5.0,3.0,1.6,0.2,1,0,0
90 | 129,6.4,2.8,5.6,2.1,0,0,1
91 | 20,5.1,3.8,1.5,0.3,1,0,0
92 | 120,6.0,2.2,5.0,1.5,0,0,1
93 | 72,6.1,2.8,4.0,1.3,0,1,0
94 | 8,5.0,3.4,1.5,0.2,1,0,0
95 | 87,6.7,3.1,4.7,1.5,0,1,0
96 | 139,6.0,3.0,4.8,1.8,0,0,1
97 | 109,6.7,2.5,5.8,1.8,0,0,1
98 | 51,7.0,3.2,4.7,1.4,0,1,0
99 | 43,4.4,3.2,1.3,0.2,1,0,0
100 | 119,7.7,2.6,6.9,2.3,0,0,1
101 | 83,5.8,2.7,3.9,1.2,0,1,0
102 | 77,6.8,2.8,4.8,1.4,0,1,0
103 | 105,6.5,3.0,5.8,2.2,0,0,1
104 | 39,4.4,3.0,1.3,0.2,1,0,0
105 | 11,5.4,3.7,1.5,0.2,1,0,0
106 | 99,5.1,2.5,3.0,1.1,0,1,0
107 | 138,6.4,3.1,5.5,1.8,0,0,1
108 | 142,6.9,3.1,5.1,2.3,0,0,1
109 | 111,6.5,3.2,5.1,2.0,0,0,1
110 | 22,5.1,3.7,1.5,0.4,1,0,0
111 | 21,5.4,3.4,1.7,0.2,1,0,0
112 | 4,4.6,3.1,1.5,0.2,1,0,0
113 | 24,5.1,3.3,1.7,0.5,1,0,0
114 | 25,4.8,3.4,1.9,0.2,1,0,0
115 | 84,6.0,2.7,5.1,1.6,0,1,0
116 | 6,5.4,3.9,1.7,0.4,1,0,0
117 | 103,7.1,3.0,5.9,2.1,0,0,1
118 | 14,4.3,3.0,1.1,0.1,1,0,0
119 | 122,5.6,2.8,4.9,2.0,0,0,1
120 | 140,6.9,3.1,5.4,2.1,0,0,1
--------------------------------------------------------------------------------
/FederatedLearningESP32/main/main.c:
--------------------------------------------------------------------------------
1 | #include
2 |
3 | #include "freertos/FreeRTOS.h"
4 | #include "freertos/task.h"
5 | #include "freertos/timers.h"
6 | #include "freertos/event_groups.h"
7 |
8 | #include "espconfiguration.h"
9 | #include "httpclient.h"
10 | #include "websocketclient.h"
11 | #include "federatedlearning.h"
12 | #include "JSONConverter.h"
13 | #include "esp_spiffs.h"
14 |
15 |
16 | #include "driver/i2c.h"
17 | #include "esp_system.h"
18 |
19 |
20 | // Defina o endereço I2C do INA219 (geralmente é 0x40)
21 | #define INA219_ADDR 0x40
22 |
23 | // Pinos I2C
24 | #define SDA_PIN 21
25 | #define SCL_PIN 22
26 |
27 | void brink_error_led(int blink){
28 |
29 | for(int i=0;i