How hawayswei/fpga-g6-final works
This is a Verilog FPGA wearable-care project for PYNQ-Z2. The principal documented flow samples arm-worn acceleration, detects a fall, asks whether the wearer is OK, then alarms and notifies a phone over Bluetooth unless cancelled; temperature alerts and manual SOS are additional capabilities. The repository is described as an evolving skeleton, and no OLED RTL directory appears in the tree. Hardware connections below rely on README-level descriptions; sampled Python sources establish the trial-analysis/model relationships, not unsampled RTL calls.
Main entry points: ctrl_guardian_fsm.v Control FSM · guardian_top.v System Top · acl_adxl362_ctrl.v Accelerometer Interface · fall_detect.v Fall Detection
Components 19
Sensors
- Accelerometer Interface
rtl/accel/acl_adxl362_ctrl.v - SPI Master
rtl/accel/acl_spi_master.v - Temperature Reader
rtl/temp/tmp_tmp3_reader.v
Fall and Control
- Fall Detection
rtl/fall/fall_detect.v - Fall Parameters
rtl/fall/fall_param_lut.v - System Top
rtl/top/guardian_top.v - Control FSM
rtl/ctrl/ctrl_guardian_fsm.v - Button Input
rtl/ctrl/ctrl_button.v - Heartbeat
rtl/ctrl/ctrl_heartbeat.v
User Alert and Phone
- OLED Prompt
- Bluetooth Command Parser
rtl/bluetooth/bt_cmd_parser.v - Bluetooth UART Receive
rtl/bluetooth/bt_uart_rx.v - Bluetooth Message Transmit
rtl/bluetooth/bt_msg_tx.v
Trial Analysis
- Trial Analyzer
tools/analyze_trials.py - Python Fall Model
tools/fall_model.py - Recorded Trial CSVs
- Analysis Report
Other components
- Wearer
- Phone
Connections 24
- Accelerometer Interface → SPI Master: reads via
- System Top → Accelerometer Interface: integrates
README.md - System Top → Temperature Reader: integrates
README.md - System Top → Fall Detection: integrates
README.md - System Top → Control FSM: integrates
README.md - System Top → OLED Prompt: integrates
README.md - System Top → Bluetooth Message Transmit: integrates
README.md - Wearer → Accelerometer Interface: wears
README.md - Wearer → Temperature Reader: wears
README.md - Accelerometer Interface → Fall Detection: provides samples
README.md - Fall Parameters → Fall Detection: sets thresholds
- Temperature Reader → Control FSM: signals abnormality
README.md - Fall Detection → Control FSM: signals fall
README.md - Button Input → Control FSM: provides input
README.md - Control FSM → OLED Prompt: requests confirmation
README.md - Wearer → Button Input: cancels or requests SOS
README.md - Control FSM → Bluetooth Message Transmit: triggers alarm
README.md - Phone → Bluetooth UART Receive: sends settings
README.md - Bluetooth UART Receive → Bluetooth Command Parser: delivers commands
- Bluetooth Command Parser → Control FSM: sets mode and height
README.md - Bluetooth Message Transmit → Phone: notifies
README.md - Recorded Trial CSVs → Trial Analyzer: supplies samples
tools/analyze_trials.py - Trial Analyzer → Python Fall Model: replays detector
tools/analyze_trials.py - Trial Analyzer → Analysis Report: writes statistics and plots
tools/analyze_trials.py