- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello all,
I have some verilog code that has many basic arithmatic symbols in it (+,-,*,/). Obviously the simple and perhaps also wise thing to do is to replace such operators with Mega-Wizard modules but I have many of them and not allways in the same bit size. my problem is this: most of the calculations are with signed (2's complement) numbers and I want to set the default synthesis of operators as signed operations. this way I would know for sure - no matter what board I'm using that when I write a+b it's synthesized as signed adder. PS the same goes also to simulations in Modelsim if anyone knows. Thanks, AyalLink Copied
3 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Have you taken a look at the templates menu in Quartus II? It has a bunch of arithmetic templates for Verilog and VHDL that might show you how to code those operators to ensure you get what you want.
Have a source file open and then go to "Edit" --> "Insert Template" --> then navigate to the language and logic type you want.- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
--- Quote Start --- Hello all, I have some verilog code that has many basic arithmatic symbols in it (+,-,*,/). Obviously the simple and perhaps also wise thing to do is to replace such operators with Mega-Wizard modules but I have many of them and not allways in the same bit size. my problem is this: most of the calculations are with signed (2's complement) numbers and I want to set the default synthesis of operators as signed operations. this way I would know for sure - no matter what board I'm using that when I write a+b it's synthesized as signed adder. PS the same goes also to simulations in Modelsim if anyone knows. Thanks, Ayal --- Quote End --- Hi, have a look to the improvements coming with Verilog 2001. As far as I know signed and unsigned is directly supported. Have a look to : http://www.asic-world.com/verilog/verilog2k1.html Kind regards GPK
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks!
silly me, this is so simple...
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