- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi all, and thanks for reading this,
I've built a nios(1) cpu identical to the one in the tutorial, however when I come to add custom instructions, I always get an incorrect result. For example, if I have a bdf design with dataa, datab, clk, clk_en, start and reset IN, and result OUT, result set to vcc, the rest grounded, calling that custom instruction instead of giving me all 1s as the result, simply gives me -1 x (data + 1). E.g. if I say: myresult = nm_test(123, 456); Instead of getting myresult = 4294967295 (the int value of 32 1s) I get myresult = -124. Similarly, if I have vhdl that is to simply return the smaller of dataa and datab: IF(dataa(31 downto 0) < datab(31 downto 0)) THEN result <= dataa; ELSE result <= datab; END IF; The code calling that custom instruction will always be returned -1 x (dataa +1). Any ideas?Link Copied
0 Replies

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