- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
Im using modelsim on something of what would be a lowpass filter code in my DSP experience. But modelsim does not produce a different output on this "signed" variable. Can I get this behavour from verilog? module module ( input clock, input [23:0] in, output reg signed[23:0] out = 0 );Link Copied
2 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
You dont show what you're actually doing. But varaibles are treated as unsigned unless you explicitly declare them signed. And then verilog behaviour means if you add two unsigned values you get an usigned result.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Had a fresh look at it, and it worked right away today.
All the used variables had to be labeled as signed. Opposed to just the output register.
Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page