summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartin Stensgård <mastensg@mastensg.net>2025-04-13 18:02:04 +0200
committerMartin Stensgård <mastensg@mastensg.net>2025-04-13 18:02:04 +0200
commita6a14060495fdf1765a4e3e56f1c1d19a9d5ef46 (patch)
treef8b6a8f9e0730bd0bcddf93ae3ae0a0e6ec7bc7b
parentf6a37b5327bebc01954037cc96ec95461cdda4d8 (diff)
record one sequence of PDM
-rw-r--r--pdm.txt1
-rw-r--r--top.v5
2 files changed, 4 insertions, 2 deletions
diff --git a/pdm.txt b/pdm.txt
new file mode 100644
index 0000000..c411d5a
--- /dev/null
+++ b/pdm.txt
@@ -0,0 +1 @@
+1010111101101000000011011100000110110010101010010001001101011100010101101100110110001100000001001011111010011110101101100101111
diff --git a/top.v b/top.v
index 4033223..10aecc4 100644
--- a/top.v
+++ b/top.v
@@ -58,8 +58,9 @@ module top(
if (pdm_t < 128) begin
pdm[pdm_t[6:0]] <= pdm_dat;
pdm_t <= pdm_t+1;
- end else if (pdm_t == 128) begin
- led5 <= 1;
+ end else begin
+ led5 <= !led5;
+ pdm_t <= 0;
end
end
endmodule