DWT in Verilog(FPGA Implementation) [duplicate] - verilog

Can anyone tell me how to write a verilog code for DWT of an image and download in to fpga.
Actually my project is to write a verilog code to perform discrete wavelet transform of a medical image, can anyone frame the logic or if have the code can you send me, please
I am using xilinx virtex 2 pro..

This one is in VHDL instead of Verilog, but might still provide at least some inspiration.

Generally FPGA's come with software for programming them. Depending on manufacturer those packages are different. But most of FPGA manufacturers(Xilinx, Altera, etc) ship tools to program their chips.
Besides that there are few 3rd party tools:
http://www.synopsys.com/Solutions/EndSolutions/FPGASolution/Pages/default.aspx
http://www.aldec.com/Products/default.aspx

Related

How to convert Verilog (.v) project to EDIF(.edf) format?

I have very poor verilog knowledge, but i need to convert Verilog project, containing some .v files and folders wth .v files to one large EDIF file for parcing.
Is there any easy way to do this?
I have found iverilog tool, but not sure how to convert all project with subfolders at once.
Thank you!
EDIF (Electronic Design Interchange Format) is a vendor-neutral format in which to store Electronic netlists and schematics. https://en.wikipedia.org/wiki/EDIF .
Verilog is a Hardware Description Language, which can describe hardware at a higher, behavioural level of abstraction.
So, in general at least, the two are not compatible. So, in general, you will need to convert your Verilog to gate-level in order for it to be suitable for EDIF. The tool that converts Verilog to gate-level is a logic synthesiser and most, if not all, logic synthesisers will be able to output your netlist as an EDIF file.
So,
if your Verilog is not already gate-level, you will need a logic synthesiser. If you're doing an FPGA design, that will be your FPGA tool: Quartus, Vivado etc.
if your Verilog is already gate-level, then there may be other, more basic, tools that convert from one to another; I don't know. But, if your Verilog is already gate-level, a logic synthesiser will also be able to do the conversion.

Generate Simple Beep on Altera DE2 Board

I've been looking online for solutions on how to generate a simple beep with an DE2 Altera board using VHDL but I can not seem to find anything.
I've seen some things that are talking about Audio Codec but I haven't been able to get a firm grasp of what I would need to do with it.
Thanks a lot!
-Will
The "audio codec" is a separate chip (a Wolfson WM8731 in your case) which can turn information on digital form into analog information to be amplified/played through a standard sound system with amplifier/speaker/etc.
You'll need to find out how to interface to the audio codec chip from the FPGA (google a datasheet for the chip), and then send it the necessary information to generate you beep. Depending on how advanced the audio chip is, this task can vary rather much in complexity. As it's an educational board, you might be able to find people who've already done something similar, and then build on their experience.
If all you need is a simple beep though, you might also be able to create a simple circuit with a piezo-buzzer or similar yourself - that can be controlled without having to use an audio codec...

How would i program analog to digital conversion using a microconroller in c

Im doing a dsp project and i want to take an anolog file and convert it to a digital output using a microconroller attached to a ADC on a dsp board. How would i program this in c?
Pretty much its as simple as that, atleast i think.
This is what i need.
Input --------- Output
Angolog --> Digital
Digital --> Anolog
You really need to clarify your question. Like what do you mean by analog file? File systems are binary from a programming perspective, sure the media is magnetic or other technologies and there is analog involved. An ADC goes from Analog to Digital, so it is an an analog input not a digital output.
ADC analog to digital converter, takes analog inputs to the device and converts them to digital so you can use them inside the chip, program, save to files, etc.
DAC digital to analog converter, takes digital values and converts them to analog outputs.
In both cases you need to look at the specific details for the chips and the board. From a programming perspective if nothing else you need to look into the details for the ADC and or DAC. Microcontrollers having an ADC is not uncommon, but you need to read up on how to get the ADC on that microcontroller to initiate a sample, how to know when the sample has completed and how to read the digital data once the sample has been taken. DACs are often external, sometimes serial, so you may have to bit bang spi or i2c or look into what hardware the microcontroller might have for speaking spi or i2c or if there is a dac in the microcontroller, how to use it (what registers to write, etc).
If you have a specific publicly available microcontroller board, for example an eval board, then that makes it much easier for folks here or elsewhere to show you where to look for the schematics, data sheets, etc. Otherwise, even knowing exactly which microcontroller and what I/O pins are used, would be helpful when asking such a question. There are probably lots of example programs out there that could be borrowed from. And it could be as simple as a few lines of C to an existing library, or as complicated as many lines of C with interrupt service routines, and possibly some assembler.
This is extremely dependent on your hardware and there's no information in the question that would enable a real answer.
In general, you should see the documentation for your system, especially the AD/DA parts. There should be good examples. If there's a particular problem, post a more specific question.

DWT in Verilog(FPGA Implementation)

Can anyone tell me how to write a verilog code for DWT of an image and download in to fpga.
Actually my project is to write a verilog code to perform discrete wavelet transform of a medical image, can anyone frame the logic or if have the code can you send me, please
I am using xilinx virtex 2 pro..
This one is in VHDL instead of Verilog, but might still provide at least some inspiration.
Generally FPGA's come with software for programming them. Depending on manufacturer those packages are different. But most of FPGA manufacturers(Xilinx, Altera, etc) ship tools to program their chips.
Besides that there are few 3rd party tools:
http://www.synopsys.com/Solutions/EndSolutions/FPGASolution/Pages/default.aspx
http://www.aldec.com/Products/default.aspx

Sound Synthesis Framework in C/C++/Objective-C?

I've searched the net but didn't found anything interesting. Maybe I'm doing something wrong.
I'm looking for sound synthesis API written on C, C++ or even Objective-C, which can synthesize different types of waves, effects are optional.
Here's a complete library/toolkit for FM (Frequency Modulation) synthesis:
link1
link2
If you have time to spare... creating simple sound synthesis from scratch is actually a fun endeavor. If you create a small buffer of 256 16 bit samples which represent either a sine. a sawtooth, block or pulse, you can copy these to a live audiobuffer (e.g. a small buffer (say 16kb)) which constantly loops. By staying ahead of the playposition, and constantly filling up the buffer with new values, you can create the soundoutput.
You can use the small buffers to combine these in interesting ways (simplest is just to add them together (additive synthesis)).
The frequency of the tone can be manipulated by using a bigger or smaller sampling step through the small buffers. Amplitude can be manipulated by scaling the samples before putting them into the output buffer.
Great fun experimenting with this!
If you have this step nailed, you can add more sophisticated effects like filters (low pass, high pass, etc) and effects (reverbs, echoes, etc)
R
Have you looked at the synthesis toolkit (STK)? It's in C++ (I don't think ObjC is the right language for audio synthesis, in fact audio units, Apple's own way of doing audio stuff, including generators/filters/effects... is in C++).
STK will run on Mac OS X, and iOS no problem (CoreAudio is supported), but will also run on Linux and Windows (Direct sound and ASIO), using RtAudio. It's really nicely done and lightweight, these guys have spent a lot of time thinking about it and it will definitely give you a big head start. It can handle loads of different audio file formats + midi (and hopefully OSC soon...).
There is also Create and CLAM which is huge, these include GUI components and many other things which you might or might not want. If you're only interested in doing sound synthesis I really recommend STK.
PortAudio is also a great C API that we used last semester in an audio programming course. It provides an audio callback...what more could you need!?
I haven't tried incorporating it with anything in Objective-C yet, but will report back when I do.
Writing audio synthesis algorithms in C/obj-C is quite difficult in my opinion. I would recommend writing your signal processing algorithms using PureData and then use ZenGarden or libpd to embed and interpret the pd patches in your app.
Another C++ library is nsound:
http://nsound.sourceforge.net
One can generate any kind of modulated signal using the Generator class or using the provided Sine class. Each time-step can have it's own instantaneous frequency and phase offset.
You can also experiment with the Python module to prototype your algorithm quickly, then implement in C++. It can produce pretty matplotlib plots from Python and even from C++!
Have you looked at CSound? It's an incredibly flexible audio generation platform, and can handle everything from simple waveform generation to FM synthesis and all kinds of filters. It also provides MIDI support, and you can extend it by writing custom opcodes. There's a full C API and several C++ APIs as well.

Resources