Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 29 additions & 0 deletions .agent/workflows/run_video_player.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
---
description: How to compile and run the Linux Video Player
---

## 1. Prepare the Environment
Ensure you have a C compiler (`gcc`) installed on your DE10-Nano or a cross-compiler on your host.

## 2. Transfer Files
Copy the following files to your DE10-Nano (e.g., using `scp`):
* `video_player.c`
* `video_qhd.bin` (Generated by `video2raw.py` on your PC)

## 3. Compile the Player
Run this command on the DE10-Nano:
```bash
gcc -o video_player video_player.c -O3
```
// turbo
## 4. Run the Player
Execute the player with root privileges (required for `/dev/mem` access):
```bash
sudo ./video_player
```

## 5. (Optional) Run Python Conversion on PC
To generate the raw video file from an MP4:
```bash
python video2raw.py input_video.mp4
```
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -30,3 +30,6 @@ hc_output/
software/*/
obj/
bin/
linux_software/image_converter/*.jpg
tests/cocotb/*.bmp
tests/cocotb/*.bin
68 changes: 35 additions & 33 deletions .qsys_edit/soc_system_schematic.nlv
Original file line number Diff line number Diff line change
Expand Up @@ -4,20 +4,20 @@ preplace inst soc_system.pll_reconfig -pg 1 -lvl 6 -y 430
preplace inst soc_system.clk_0 -pg 1 -lvl 1 -y 200
preplace inst soc_system.hps_0.clk_0 -pg 1
preplace inst soc_system.nios2_gen2_0.cpu -pg 1
preplace inst soc_system.pll_0 -pg 1 -lvl 2 -y 460
preplace inst soc_system.pll_0 -pg 1 -lvl 2 -y 480
preplace inst soc_system.burst_master_0 -pg 1 -lvl 5 -y 1010
preplace inst soc_system.hps_0.axi_sdram -pg 1
preplace inst soc_system -pg 1 -lvl 1 -y 40 -regy -20
preplace inst soc_system.nios2_gen2_0.reset_bridge -pg 1
preplace inst soc_system.hps_0.timer0 -pg 1
preplace inst soc_system.i2c_hdmi -pg 1 -lvl 6 -y 300
preplace inst soc_system.i2c_hdmi -pg 1 -lvl 6 -y 290
preplace inst soc_system.hps_0.timer1 -pg 1
preplace inst soc_system.hps_0.i2c0 -pg 1
preplace inst soc_system.address_span_extender_0 -pg 1 -lvl 3 -y 700
preplace inst soc_system.hps_0.timer2 -pg 1
preplace inst soc_system.hps_0.wd_timer0 -pg 1
preplace inst soc_system.hps_0.i2c1 -pg 1
preplace inst soc_system.video_dma -pg 1 -lvl 2 -y 600
preplace inst soc_system.video_dma -pg 1 -lvl 2 -y 660
preplace inst soc_system.hps_0.timer3 -pg 1
preplace inst soc_system.hps_0.wd_timer1 -pg 1
preplace inst soc_system.hps_0.i2c2 -pg 1
Expand All @@ -42,9 +42,10 @@ preplace inst soc_system.hps_0.l3regs -pg 1
preplace inst soc_system.hps_0.sdmmc -pg 1
preplace inst soc_system.button_pio -pg 1 -lvl 4 -y 100
preplace inst soc_system.hps_0.axi_ocram -pg 1
preplace inst soc_system.sysid_qsys -pg 1 -lvl 4 -y 570
preplace inst soc_system.sysid_qsys -pg 1 -lvl 4 -y 540
preplace inst soc_system.nios2_gen2_0.clock_bridge -pg 1
preplace inst soc_system.nios2_gen2_0 -pg 1 -lvl 2 -y 50
preplace inst soc_system.hdmi_sync_mm -pg 1 -lvl 6 -y 90
preplace inst soc_system.led_pio -pg 1 -lvl 4 -y 380
preplace inst soc_system.hps_0.arm_gic_0 -pg 1
preplace inst soc_system.hps_0.rstmgr -pg 1
Expand All @@ -56,12 +57,12 @@ preplace inst soc_system.mm_bridge_0 -pg 1 -lvl 3 -y 480
preplace inst soc_system.pll_locked -pg 1 -lvl 6 -y 570
preplace inst soc_system.hps_0.nand0 -pg 1
preplace inst soc_system.hps_0.gmac0 -pg 1
preplace inst soc_system.hps_0 -pg 1 -lvl 4 -y 680
preplace inst soc_system.hps_0 -pg 1 -lvl 4 -y 670
preplace inst soc_system.hps_0.hps_io.border -pg 1
preplace inst soc_system.hps_0.gmac1 -pg 1
preplace inst soc_system.hps_0.eosc1 -pg 1
preplace inst soc_system.hps_0.fpgamgr -pg 1
preplace inst soc_system.dipsw_pio -pg 1 -lvl 4 -y 240
preplace inst soc_system.dipsw_pio -pg 1 -lvl 4 -y 220
preplace inst soc_system.hps_0.dcan0 -pg 1
preplace inst soc_system.hps_0.eosc2 -pg 1
preplace inst soc_system.jtag_uart -pg 1 -lvl 3 -y 70
Expand All @@ -71,33 +72,34 @@ preplace inst soc_system.hps_0.f2s_sdram_ref_clk -pg 1
preplace inst soc_system.hps_0.dma -pg 1
preplace inst soc_system.hps_0.sdrctl -pg 1
preplace inst soc_system.hps_0.bridges -pg 1
preplace inst soc_system.timer_0 -pg 1 -lvl 3 -y 280
preplace inst soc_system.timer_0 -pg 1 -lvl 3 -y 260
preplace inst soc_system.burst_master_4_0 -pg 1 -lvl 6 -y 960
preplace netloc POINT_TO_POINT<net_container>soc_system</net_container>(SLAVE)pll_0.reconfig_from_pll,(SLAVE)pll_reconfig.reconfig_from_pll) 1 1 5 590 450 NJ 450 NJ 520 NJ 540 2210
preplace netloc FAN_OUT<net_container>soc_system</net_container>(SLAVE)button_pio.s1,(SLAVE)led_pio.s1,(SLAVE)dipsw_pio.s1,(MASTER)mm_bridge_0.m0,(SLAVE)sysid_qsys.control_slave) 1 3 1 1400
preplace netloc INTERCONNECT<net_container>soc_system</net_container>(SLAVE)timer_0.s1,(MASTER)burst_master_0.read_master,(SLAVE)i2c_hdmi.csr,(MASTER)hps_0.h2f_axi_master,(SLAVE)burst_master_0.csr_slave,(SLAVE)nios2_gen2_0.debug_mem_slave,(MASTER)nios2_gen2_0.data_master,(SLAVE)address_span_extender_0.windowed_slave,(MASTER)nios2_gen2_0.instruction_master,(SLAVE)pll_locked.s1,(SLAVE)onchip_memory2_0.s1,(SLAVE)burst_master_4_0.cs_slave,(SLAVE)jtag_uart.avalon_jtag_slave,(SLAVE)address_span_extender_0.cntl,(SLAVE)pll_reconfig.mgmt_avalon_slave) 1 1 5 590 190 970 1040 NJ 1040 1870 810 2190
preplace netloc POINT_TO_POINT<net_container>soc_system</net_container>(SLAVE)pll_0.reconfig_from_pll,(SLAVE)pll_reconfig.reconfig_from_pll) 1 1 5 510 470 NJ 470 NJ 530 NJ 540 2150
preplace netloc EXPORT<net_container>soc_system</net_container>(MASTER)soc_system.pll_outclk,(MASTER)pll_0.outclk0) 1 2 5 NJ 450 NJ 490 NJ 420 NJ 420 NJ
preplace netloc EXPORT<net_container>soc_system</net_container>(SLAVE)soc_system.clk,(SLAVE)clk_0.clk_in) 1 0 1 NJ
preplace netloc FAN_OUT<net_container>soc_system</net_container>(SLAVE)dipsw_pio.irq,(SLAVE)button_pio.irq,(MASTER)hps_0.f2h_irq0) 1 3 2 1380 990 1750
preplace netloc EXPORT<net_container>soc_system</net_container>(SLAVE)soc_system.reset,(SLAVE)clk_0.clk_in_reset) 1 0 1 NJ
preplace netloc EXPORT<net_container>soc_system</net_container>(SLAVE)hps_0.memory,(SLAVE)soc_system.memory) 1 0 4 NJ 890 NJ 890 NJ 890 NJ
preplace netloc EXPORT<net_container>soc_system</net_container>(SLAVE)soc_system.hps_0_f2h_debug_reset_req,(SLAVE)hps_0.f2h_debug_reset_req) 1 0 4 NJ 830 NJ 830 NJ 830 NJ
preplace netloc EXPORT<net_container>soc_system</net_container>(SLAVE)soc_system.hps_0_f2h_stm_hw_events,(SLAVE)hps_0.f2h_stm_hw_events) 1 0 4 NJ 910 NJ 910 NJ 910 NJ
preplace netloc EXPORT<net_container>soc_system</net_container>(SLAVE)soc_system.hps_0_f2h_cold_reset_req,(SLAVE)hps_0.f2h_cold_reset_req) 1 0 4 NJ 810 NJ 810 NJ 810 NJ
preplace netloc EXPORT<net_container>soc_system</net_container>(SLAVE)button_pio.external_connection,(SLAVE)soc_system.button_pio_external_connection) 1 0 4 NJ 190 NJ 250 NJ 250 NJ
preplace netloc EXPORT<net_container>soc_system</net_container>(SLAVE)clk_0.clk_in,(SLAVE)soc_system.clk) 1 0 1 NJ
preplace netloc POINT_TO_POINT<net_container>soc_system</net_container>(SLAVE)mm_bridge_0.s0,(MASTER)hps_0.h2f_lw_axi_master) 1 2 3 1050 1000 NJ 1000 1810
preplace netloc INTERCONNECT<net_container>soc_system</net_container>(SLAVE)mm_bridge_0.reset,(SLAVE)sysid_qsys.reset,(SLAVE)button_pio.reset,(SLAVE)jtag_uart.reset,(SLAVE)video_dma.reset,(SLAVE)onchip_memory2_0.reset1,(SLAVE)nios2_gen2_0.reset,(SLAVE)i2c_hdmi.reset_sink,(SLAVE)burst_master_4_0.reset,(MASTER)clk_0.clk_reset,(SLAVE)burst_master_0.reset,(SLAVE)address_span_extender_0.reset,(SLAVE)pll_reconfig.mgmt_reset,(SLAVE)pll_locked.reset,(SLAVE)led_pio.reset,(MASTER)nios2_gen2_0.debug_reset_request,(SLAVE)pll_0.reset,(SLAVE)dipsw_pio.reset,(SLAVE)timer_0.reset) 1 1 5 530 330 1010 690 1440 1080 1910 1000 2150
preplace netloc POINT_TO_POINT<net_container>soc_system</net_container>(SLAVE)pll_reconfig.reconfig_to_pll,(SLAVE)pll_0.reconfig_to_pll) 1 1 5 550 430 NJ 430 NJ 500 NJ 520 N
preplace netloc FAN_OUT<net_container>soc_system</net_container>(MASTER)nios2_gen2_0.irq,(SLAVE)jtag_uart.irq,(SLAVE)timer_0.irq,(SLAVE)i2c_hdmi.interrupt_sender) 1 2 4 990 270 NJ 230 NJ 230 2210
preplace netloc FAN_OUT<net_container>soc_system</net_container>(SLAVE)dipsw_pio.irq,(MASTER)hps_0.f2h_irq0,(SLAVE)button_pio.irq) 1 3 2 1480 1020 1830
preplace netloc EXPORT<net_container>soc_system</net_container>(SLAVE)button_pio.external_connection,(SLAVE)soc_system.button_pio_external_connection) 1 0 4 NJ 190 NJ 230 NJ 230 NJ
preplace netloc EXPORT<net_container>soc_system</net_container>(SLAVE)hps_0.f2h_cold_reset_req,(SLAVE)soc_system.hps_0_f2h_cold_reset_req) 1 0 4 NJ 810 NJ 810 NJ 810 NJ
preplace netloc INTERCONNECT<net_container>soc_system</net_container>(SLAVE)i2c_hdmi.reset_sink,(SLAVE)jtag_uart.reset,(SLAVE)video_dma.reset,(SLAVE)dipsw_pio.reset,(SLAVE)burst_master_0.reset,(SLAVE)timer_0.reset,(MASTER)clk_0.clk_reset,(SLAVE)hdmi_sync_mm.reset,(SLAVE)pll_reconfig.mgmt_reset,(SLAVE)burst_master_4_0.reset,(SLAVE)onchip_memory2_0.reset1,(SLAVE)pll_locked.reset,(SLAVE)led_pio.reset,(SLAVE)mm_bridge_0.reset,(SLAVE)address_span_extender_0.reset,(MASTER)nios2_gen2_0.debug_reset_request,(SLAVE)nios2_gen2_0.reset,(SLAVE)pll_0.reset,(SLAVE)sysid_qsys.reset,(SLAVE)button_pio.reset) 1 1 5 410 630 910 930 1240 1090 1830 980 2090
preplace netloc POINT_TO_POINT<net_container>soc_system</net_container>(SLAVE)pll_0.locked,(SLAVE)pll_locked.external_connection) 1 1 5 490 650 NJ 570 NJ 630 NJ 600 NJ
preplace netloc EXPORT<net_container>soc_system</net_container>(MASTER)soc_system.hdmi_sync_master,(MASTER)hdmi_sync_mm.m0) 1 6 1 NJ
preplace netloc POINT_TO_POINT<net_container>soc_system</net_container>(SLAVE)mm_bridge_0.s0,(MASTER)hps_0.h2f_lw_axi_master) 1 2 3 970 1030 NJ 1030 1730
preplace netloc EXPORT<net_container>soc_system</net_container>(SLAVE)hps_0.f2h_debug_reset_req,(SLAVE)soc_system.hps_0_f2h_debug_reset_req) 1 0 4 NJ 830 NJ 830 NJ 830 NJ
preplace netloc POINT_TO_POINT<net_container>soc_system</net_container>(SLAVE)pll_reconfig.reconfig_to_pll,(SLAVE)pll_0.reconfig_to_pll) 1 1 5 470 430 NJ 430 NJ 510 NJ 520 N
preplace netloc EXPORT<net_container>soc_system</net_container>(SLAVE)soc_system.memory,(SLAVE)hps_0.memory) 1 0 4 NJ 870 NJ 870 NJ 870 NJ
preplace netloc EXPORT<net_container>soc_system</net_container>(SLAVE)soc_system.led_pio_external_connection,(SLAVE)led_pio.external_connection) 1 0 4 NJ 410 NJ 410 NJ 410 NJ
preplace netloc EXPORT<net_container>soc_system</net_container>(SLAVE)soc_system.dipsw_pio_external_connection,(SLAVE)dipsw_pio.external_connection) 1 0 4 NJ 170 NJ 230 NJ 230 NJ
preplace netloc EXPORT<net_container>soc_system</net_container>(SLAVE)soc_system.video_dma_s,(SLAVE)video_dma.s0) 1 0 2 NJ 650 NJ
preplace netloc EXPORT<net_container>soc_system</net_container>(SLAVE)soc_system.hps_0_hps_io,(SLAVE)hps_0.hps_io) 1 0 4 NJ 870 NJ 870 NJ 870 NJ
preplace netloc EXPORT<net_container>soc_system</net_container>(SLAVE)soc_system.hps_0_f2h_warm_reset_req,(SLAVE)hps_0.f2h_warm_reset_req) 1 0 4 NJ 850 NJ 850 NJ 850 NJ
preplace netloc POINT_TO_POINT<net_container>soc_system</net_container>(SLAVE)pll_locked.external_connection,(SLAVE)pll_0.locked) 1 1 5 570 590 NJ 570 NJ 560 NJ 600 N
preplace netloc FAN_OUT<net_container>soc_system</net_container>(SLAVE)dipsw_pio.clk,(SLAVE)pll_0.refclk,(MASTER)clk_0.clk,(SLAVE)hps_0.f2h_sdram0_clock,(SLAVE)button_pio.clk,(SLAVE)address_span_extender_0.clock,(SLAVE)hps_0.f2h_sdram1_clock,(SLAVE)timer_0.clk,(SLAVE)burst_master_4_0.clock,(SLAVE)hps_0.h2f_axi_clock,(SLAVE)video_dma.clk,(SLAVE)onchip_memory2_0.clk1,(SLAVE)pll_locked.clk,(SLAVE)hps_0.h2f_lw_axi_clock,(SLAVE)jtag_uart.clk,(SLAVE)mm_bridge_0.clk,(SLAVE)burst_master_0.clock,(SLAVE)i2c_hdmi.clock,(SLAVE)nios2_gen2_0.clk,(SLAVE)hps_0.f2h_axi_clock,(SLAVE)led_pio.clk,(SLAVE)sysid_qsys.clk,(SLAVE)pll_reconfig.mgmt_clk) 1 1 5 510 210 1030 180 1360 1060 1850 970 2170
preplace netloc FAN_IN<net_container>soc_system</net_container>(MASTER)burst_master_0.write_master_1,(SLAVE)hps_0.f2h_axi_slave,(MASTER)video_dma.m0,(MASTER)burst_master_4_0.read_master,(MASTER)burst_master_4_0.write_master,(MASTER)address_span_extender_0.expanded_master) 1 2 5 950 670 1280 1100 NJ 950 2130 1050 2410
preplace netloc EXPORT<net_container>soc_system</net_container>(MASTER)hps_0.h2f_reset,(MASTER)soc_system.hps_0_h2f_reset) 1 4 3 NJ 850 NJ 850 NJ
preplace netloc EXPORT<net_container>soc_system</net_container>(MASTER)pll_0.outclk0,(MASTER)soc_system.pll_outclk) 1 2 5 NJ 470 NJ 540 NJ 560 NJ 560 NJ
preplace netloc EXPORT<net_container>soc_system</net_container>(SLAVE)soc_system.i2c_hdmi,(SLAVE)i2c_hdmi.i2c_serial) 1 0 6 NJ 390 NJ 390 NJ 390 NJ 370 NJ 370 NJ
levelinfo -pg 1 0 200 2560
levelinfo -hier soc_system 210 320 710 1100 1620 1940 2240 2430
preplace netloc FAN_OUT<net_container>soc_system</net_container>(SLAVE)button_pio.s1,(SLAVE)dipsw_pio.s1,(SLAVE)sysid_qsys.control_slave,(SLAVE)led_pio.s1,(MASTER)mm_bridge_0.m0) 1 3 1 1200
preplace netloc FAN_OUT<net_container>soc_system</net_container>(MASTER)nios2_gen2_0.irq,(SLAVE)jtag_uart.irq,(SLAVE)i2c_hdmi.interrupt_sender,(SLAVE)timer_0.irq) 1 2 4 890 250 NJ 350 NJ 350 2050
preplace netloc FAN_OUT<net_container>soc_system</net_container>(MASTER)clk_0.clk,(SLAVE)pll_locked.clk,(SLAVE)hps_0.f2h_axi_clock,(SLAVE)hdmi_sync_mm.clk,(SLAVE)pll_reconfig.mgmt_clk,(SLAVE)pll_0.refclk,(SLAVE)sysid_qsys.clk,(SLAVE)timer_0.clk,(SLAVE)nios2_gen2_0.clk,(SLAVE)i2c_hdmi.clock,(SLAVE)hps_0.f2h_sdram1_clock,(SLAVE)led_pio.clk,(SLAVE)video_dma.clk,(SLAVE)address_span_extender_0.clock,(SLAVE)hps_0.h2f_lw_axi_clock,(SLAVE)onchip_memory2_0.clk1,(SLAVE)hps_0.f2h_sdram0_clock,(SLAVE)hps_0.h2f_axi_clock,(SLAVE)button_pio.clk,(SLAVE)dipsw_pio.clk,(SLAVE)burst_master_0.clock,(SLAVE)burst_master_4_0.clock,(SLAVE)jtag_uart.clk,(SLAVE)mm_bridge_0.clk) 1 1 5 450 610 950 690 1320 1070 1790 940 2130
preplace netloc EXPORT<net_container>soc_system</net_container>(SLAVE)soc_system.dipsw_pio_external_connection,(SLAVE)dipsw_pio.external_connection) 1 0 4 NJ 170 NJ 210 NJ 210 NJ
preplace netloc EXPORT<net_container>soc_system</net_container>(SLAVE)soc_system.video_dma_s,(SLAVE)video_dma.s0) 1 0 2 NJ 710 NJ
preplace netloc EXPORT<net_container>soc_system</net_container>(SLAVE)soc_system.hps_0_hps_io,(SLAVE)hps_0.hps_io) 1 0 4 NJ 910 NJ 910 NJ 910 NJ
preplace netloc EXPORT<net_container>soc_system</net_container>(SLAVE)soc_system.hps_0_f2h_warm_reset_req,(SLAVE)hps_0.f2h_warm_reset_req) 1 0 4 NJ 890 NJ 890 NJ 890 NJ
preplace netloc FAN_IN<net_container>soc_system</net_container>(SLAVE)hps_0.f2h_axi_slave,(MASTER)burst_master_0.write_master_1,(MASTER)address_span_extender_0.expanded_master,(MASTER)burst_master_4_0.write_master,(MASTER)burst_master_4_0.read_master,(MASTER)video_dma.m0) 1 2 5 890 670 1200 1050 NJ 1000 2150 950 2360
preplace netloc EXPORT<net_container>soc_system</net_container>(SLAVE)i2c_hdmi.i2c_serial,(SLAVE)soc_system.i2c_hdmi) 1 0 6 NJ 370 NJ 370 NJ 370 NJ 370 NJ 370 NJ
preplace netloc EXPORT<net_container>soc_system</net_container>(MASTER)soc_system.hps_0_h2f_reset,(MASTER)hps_0.h2f_reset) 1 4 3 NJ 840 NJ 840 NJ
preplace netloc INTERCONNECT<net_container>soc_system</net_container>(SLAVE)burst_master_4_0.cs_slave,(SLAVE)address_span_extender_0.windowed_slave,(SLAVE)i2c_hdmi.csr,(SLAVE)nios2_gen2_0.debug_mem_slave,(MASTER)burst_master_0.read_master,(SLAVE)address_span_extender_0.cntl,(SLAVE)pll_reconfig.mgmt_avalon_slave,(SLAVE)onchip_memory2_0.s1,(MASTER)hps_0.h2f_axi_master,(SLAVE)jtag_uart.avalon_jtag_slave,(SLAVE)burst_master_0.csr_slave,(SLAVE)pll_locked.s1,(MASTER)nios2_gen2_0.instruction_master,(MASTER)nios2_gen2_0.data_master,(SLAVE)hdmi_sync_mm.s0,(SLAVE)timer_0.s1) 1 1 5 510 190 870 950 NJ 1010 1770 960 2110
preplace netloc EXPORT<net_container>soc_system</net_container>(SLAVE)hps_0.f2h_stm_hw_events,(SLAVE)soc_system.hps_0_f2h_stm_hw_events) 1 0 4 NJ 850 NJ 850 NJ 850 NJ
levelinfo -pg 1 0 200 2510
levelinfo -hier soc_system 210 240 630 1020 1540 1860 2190 2380
65 changes: 65 additions & 0 deletions CLAUD.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
# CLAUDE.md

Behavioral guidelines to reduce common LLM coding mistakes. Merge with project-specific instructions as needed.

**Tradeoff:** These guidelines bias toward caution over speed. For trivial tasks, use judgment.

## 1. Think Before Coding

**Don't assume. Don't hide confusion. Surface tradeoffs.**

Before implementing:
- State your assumptions explicitly. If uncertain, ask.
- If multiple interpretations exist, present them - don't pick silently.
- If a simpler approach exists, say so. Push back when warranted.
- If something is unclear, stop. Name what's confusing. Ask.

## 2. Simplicity First

**Minimum code that solves the problem. Nothing speculative.**

- No features beyond what was asked.
- No abstractions for single-use code.
- No "flexibility" or "configurability" that wasn't requested.
- No error handling for impossible scenarios.
- If you write 200 lines and it could be 50, rewrite it.

Ask yourself: "Would a senior engineer say this is overcomplicated?" If yes, simplify.

## 3. Surgical Changes

**Touch only what you must. Clean up only your own mess.**

When editing existing code:
- Don't "improve" adjacent code, comments, or formatting.
- Don't refactor things that aren't broken.
- Match existing style, even if you'd do it differently.
- If you notice unrelated dead code, mention it - don't delete it.

When your changes create orphans:
- Remove imports/variables/functions that YOUR changes made unused.
- Don't remove pre-existing dead code unless asked.

The test: Every changed line should trace directly to the user's request.

## 4. Goal-Driven Execution

**Define success criteria. Loop until verified.**

Transform tasks into verifiable goals:
- "Add validation" → "Write tests for invalid inputs, then make them pass"
- "Fix the bug" → "Write a test that reproduces it, then make it pass"
- "Refactor X" → "Ensure tests pass before and after"

For multi-step tasks, state a brief plan:
```
1. [Step] → verify: [check]
2. [Step] → verify: [check]
3. [Step] → verify: [check]
```

Strong success criteria let you loop independently. Weak criteria ("make it work") require constant clarification.

---

**These guidelines are working if:** fewer unnecessary changes in diffs, fewer rewrites due to overcomplication, and clarifying questions come before implementation rather than after mistakes.
5 changes: 5 additions & 0 deletions DC_FIFO.qip
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
set_global_assignment -name IP_TOOL_NAME "FIFO"
set_global_assignment -name IP_TOOL_VERSION "20.1"
set_global_assignment -name IP_GENERATED_DEVICE_FAMILY "{Cyclone V}"
set_global_assignment -name VERILOG_FILE [file join $::quartus(qip_path) "DC_FIFO.v"]
set_global_assignment -name MISC_FILE [file join $::quartus(qip_path) "DC_FIFO_bb.v"]
Loading