aboutsummaryrefslogtreecommitdiffstats
path: root/sound.v
diff options
context:
space:
mode:
authorH. Peter Anvin <hpa@trantor.hos.anvin.org>2009-01-16 21:48:39 -0800
committerH. Peter Anvin <hpa@trantor.hos.anvin.org>2009-01-16 21:48:39 -0800
commitb695f141475de6c91894afe137017f4767a7fef4 (patch)
tree1715141be69e3f8b000d1dbfe9c1f8fc9dbc9b8c /sound.v
parentf08118d71cda17a81cd56bd2be2c5f2657a18e06 (diff)
downloadabc80-b695f141475de6c91894afe137017f4767a7fef4.tar.gz
abc80-b695f141475de6c91894afe137017f4767a7fef4.tar.xz
abc80-b695f141475de6c91894afe137017f4767a7fef4.zip
sound.v: fix the sawtooth generator boundaries
Constrain the sawtooth generator properly.
Diffstat (limited to 'sound.v')
-rw-r--r--sound.v4
1 files changed, 2 insertions, 2 deletions
diff --git a/sound.v b/sound.v
index 6f8626c..ad3a0a7 100644
--- a/sound.v
+++ b/sound.v
@@ -36,9 +36,9 @@ module slf(
always @(posedge clk)
if ( clk_en )
begin
- if ( ctr[13:10] == `vco_max )
+ if ( ctr == `vco_max )
up <= 0;
- else if ( ctr[13:10] == `vco_min )
+ else if ( ctr == `vco_min )
up <= 1;
if ( up )