Guest thefloe Posted August 13, 2011 Report Share Posted August 13, 2011 I was really pleased to read about the Papilio One and your Arduino like AVR8 core. At the moment I only have access to a Altera FPGA Board and so I tried to port the project to my Cyclone2. First tests were successful but when I tried the first GCC compiled project the code failed. The problem is the jump instruction at the beginning of the file: 0x940C 0x0030. After that the PC is set to 0x940C and after that to zero again. I checked the XPM files and read the hardcoded men info. There the jump was instruction was reversed: 0x007E 0x940C. So I tried a little around changing the bytes in the words and the words order but had no success. Can anyone help me out on this? Link to comment Share on other sites More sharing options...
Jack Gassett Posted August 16, 2011 Report Share Posted August 16, 2011 Hello, I'm not sure about the Altera tools but it sounds like the kind of issue where data2mem will reverse a couple bytes if the mem file is not in a very specific format. Take a look at this forum topic: http://www.gadgetfactory.net/gadgetforum/index.php?topic=134.msg275#msg275 Jack. Link to comment Share on other sites More sharing options...
Guest thefloe Posted August 16, 2011 Report Share Posted August 16, 2011 Hi, I'm not using that data2mem tool. I wrote my own tool to convert from hex to alter memory initialization file (mif). The strange thing is that when decoding the jmp instruction (0x940C) is that the PC is set to ox940C after 2 cycles where the core should have read the second part of the 32bit instruction and set it to 0x0030. I tried functional and timing simulations with alter modelsim but no success. Is anyone else working on the AVR8 for ALTERAs? Link to comment Share on other sites More sharing options...
Jack Gassett Posted August 17, 2011 Report Share Posted August 17, 2011 Not that I know of, But I spent a long time in simulation trying to track down very similiar problems when I first got the AVR8 up and running. The processor turned out to be perfectly fine and it was the supporting tools that caused the problem. Ruslan has had the AVR8 design running in silicon for many years, so it is safe to assume that the AVR8 design is solid. It could be something Altera related, but I would look closely at the tools. Jack. Link to comment Share on other sites More sharing options...
Guest thefloe Posted August 17, 2011 Report Share Posted August 17, 2011 Figured it out. I created the Altera Memories (using the MegaFunction Wizard) with registered output ports. Because of that every instruction was delayed one clock cycle and therefor the address for the jump was really the jump instruction itself. After unchecking the checkboxes for registered output ports for program memory and data memory the core workes fine. Thank you! Link to comment Share on other sites More sharing options...
Jack Gassett Posted August 17, 2011 Report Share Posted August 17, 2011 Excellent, glad to hear it. Jack. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.