Commit 7d0c2532 authored by Paul Boven's avatar Paul Boven
Browse files

More missing VHDL parts

parent f97b8bb6
......@@ -8,6 +8,8 @@ radio astronomy observations, such as live or recorded pulsar observations and
Design and realization by Paul Boven (p.boven@xs4all.nl).
(c) Paul Boven, released under the GPLv2.
## Current status: Will not even compile, work in progress.
This repository will contain the VHDL sources and helper scripts, PCB design files, and photographs.
### Specifications:
......
......@@ -5,10 +5,17 @@
all: main.twr main.bit
xst/projnav.tmp:
mkdir -p xst/projnav.tmp
# XST
main.ngc: main.xst main.prj main.vhd FFT_stream.vhd eth_tx.vhd PCK_CRC32_D4.vhd LCD_Driver.vhd LCD_Controller.vhd
main.ngc: main.xst main.prj main.vhd FFT_stream.vhd eth_tx.vhd PCK_CRC32_D4.vhd LCD_Driver.vhd LCD_Controller.vhd window.vhd main.lso xst/projnav.tmp
xst -ifn main.xst -ofn main.syr
# TODO: generate the window file automatically
# Generate the window
#window.vhd: window.pl
# perl window.pl
# Ngdbuild
main.ngd: main.ngc main.ucf
ngdbuild -dd _nog -nt timestamp -p xc3sd1800a-fg676-4 -uc main.ucf main.ngc main.ngd
......
#!/usr/bin/perl
# Hann window, output in VHDL constants
$N = 2**12; # number of points
$max = 2**16; # number of bits
$pi = 3.1415926;
$i = 0;
while ($i < $N)
{
# print ($max*($N/2-abs($i-$N/2))/$N/2);
printf "X\"%04X\"", int($max*0.5*(1-cos(2*$pi*$i/($N))));
if ($i % 8 == 7) {
print ",\n"; }
else {
print ", "; }
$i++;
}
This diff is collapsed.
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment