You can check a box that will insert spaces instead of a tab character when you hit the tab key, but that doesn't affect the existing text in your file.
About the reset problem: Is anyone still having any issues?
About the tab situation: I don't know what I'll do about this, yet. Personally, I kind of like tabs, because no matter what you type with tabs, you go to easily-identifiable offsets. Spaced indentions get smeared all over the place when I edit code, and that frustrates me, as I'm a little OCD about things lining up.
About the reset problem: Is anyone still having any issues?
About the tab situation: I don't know what I'll do about this, yet. Personally, I kind of like tabs, because no matter what you type with tabs, you go to easily-identifiable offsets. Spaced indentions get smeared all over the place when I edit code, and that frustrates me, as I'm a little OCD about things lining up.
I have the patch from the TP but I notice I have a EEPROM attached on the DE0 and it doesn't like a reboot, I have to F10 it each time. Did I miss something.
BTW, I haven't had that much time to spend on this and learn Verilog on the go but I'm hoping to spend more time this week doing so, just as well! So a quick question which I should really ask on a new thread but where in the code is the bit that "rotates the propeller" to select the next cog? I can see all the bus and bus latches but maybe my eyes are playing tricks on me.
I have the patch from the TP but I notice I have a EEPROM attached on the DE0 and it doesn't like a reboot, I have to F10 it each time. Did I miss something.
BTW, I haven't had that much time to spend on this and learn Verilog on the go but I'm hoping to spend more time this week doing so, just as well! So a quick question which I should really ask on a new thread but where in the code is the bit that "rotates the propeller" to select the next cog? I can see all the bus and bus latches but maybe my eyes are playing tricks on me.
BTWA, Thanks heaps and heaps again and again.
Do you have a pull-up resistor on SDA?
In dig.v there's this section:
// bus select
reg [7:0] bus_sel;
always @(posedge clk_cog or negedge nres)
if (!nres)
bus_sel <= 8'b0;
else if (ena_bus)
bus_sel <= {bus_sel[6:0], ~|bus_sel[6:0]};
That bus_sel group of 8 signals is the hub rotator. They're all 0 on reset, but then a single '1' starts rotating from bit0 to bit7, and back to bit0 again, round and round. That's what determines which cog has access to the hub.
About the tab situation: I don't know what I'll do about this, yet. Personally, I kind of like tabs, because no matter what you type with tabs, you go to easily-identifiable offsets. Spaced indentions get smeared all over the place when I edit code, and that frustrates me, as I'm a little OCD about things lining up.
The notepad++ feature I mentioned works both ways, so you can still restore any file to TABS, and work like that, then publish with TABS to spaces. ( Or anyone who does not like TABS can do this themselves. )
The notepad++ feature I mentioned works both ways, so you can still restore any file to TABS, and work like that, then publish with TABS to spaces. ( Or anyone who does not like TABS can do this themselves. )
// bus select
reg [7:0] bus_sel;
always @(posedge clk_cog or negedge nres)
if (!nres)
bus_sel <= 8'b0;
else if (ena_bus)
bus_sel <= {bus_sel[6:0], ~|bus_sel[6:0]};
That bus_sel group of 8 signals is the hub rotator. They're all 0 on reset, but then a single '1' starts rotating from bit0 to bit7, and back to bit0 again, round and round. That's what determines which cog has access to the hub.
Yes, I have the pullup but I will double check anyway. Since I didn't really have any DIP the EEPROM is actually on another board where I have the Prop hardwired into reset. Works normally once booted and I can read other I2C devices easily.
I have been commenting source and did notice the hub in dig.v but I think I missed the import of the other part
Chip,
I am surprised Quartus only replaces tabs with a single space. What a PITA.
Anyway, don't waste too much time with this. We can do this for you.. heater can you do it again?
Yes some editors can sort this out for you and display the thing correctly. Not all do. It also goes wrong in other circumstances, for example when browsing the code on the pages of GitHub. Or try cutting and pasting a snippet of that source into a post on this forum, it will be screwed.
Worst of all if you have contributors not following the "no tabs rule" you will end up with source that contains spaces and tabs all mixed up. You will get people "fixing" that formatting when they see it. This all makes viewing diffs between different versions much harder as all those non-functional space changes will show up in the diffs.
Just say no to tabs. I beg you...on my knees here...
We can do this for you.. heater can you do it again?
Or just hit the "Download ZIP" button on that page.
The tabs to spaces change is the only change I have made to that code so you are good to go.
By the way, I used the Sublime Text editor which can view those original files correctly and then save them with the tab issue corrected. Doing a naive tab to space swap will make a mess of things, don't do that. Just fetch my version.
Yes some editors can sort this out for you and display the thing correctly. Not all do. It also goes wrong in other circumstances, for example when browsing the code on the pages of GitHub. Or try cutting and pasting a snippet of that source into a post on this forum, it will be screwed.
Worst of all if you have contributors not following the "no tabs rule" you will end up with source that contains spaces and tabs all mixed up. You will get people "fixing" that formatting when they see it. This all makes viewing diffs between different versions much harder as all those non-functional space changes will show up in the diffs.
Just say no to tabs. I beg you...on my knees here...
Or just hit the "Download ZIP" button on that page.
The tabs to spaces change is the only change I have made to that code so you are good to go.
By the way, I used the Sublime Text editor which can view those original files correctly and then save them with the tab issue corrected. Doing a naive tab to space swap will make a mess of things, don't do that. Just fetch my version.
Thanks for doing that. I take it these are the new files that we posted this afternoon that have the DIRA reset fix and the BeMicroCV support?
.... Doing a naive tab to space swap will make a mess of things, don't do that.
I presume you meant a simple replace TAB with one char ?
The Notepad++ Edit feature I mentioned is somewhat smarter, and works nicely in both directions, & replaces TAB with 8 chars (or whatever you have set), and going back swaps a TAB in for every adjacent 8 spaces.
Makes it easy to support both standards, if someone really wants to.
No, my gihub version is 5 days old already. It is basically as you released it with only the tabs fixed. I added a license file to the top level directory where it should be and a README.md describing what it all is. I also threw in the pdf docs for convenience.
You can see what is what by browsing the code on git hub, for example here: https://github.com/ZiCog/P8X32A_Emulation/tree/master/P8X32A_DE0_Nano where the DE0-nano files are listed together with a commit comment.
Click on that comment on a .v file and you will see all the tab to space changes that were made, yuk, this is what happens when contributors mix up spaces and tabs and generally mess with formatting.
I was just wondering about what to do with the DIRA reset fix and BeMicro support changes.
What we should do is as follows:
1) You make your self a fork of my github repo. That only requires that Parallax signs itself up for github, you then visit my repo page and hit the "fork" button. Boom you have your own clone in the Parallax account.
2) You fix up the reset and BeMicro stuff in the Parallax repo.
3) You send a "pull" request to me.
4) I pull those changes into my version from the Parallax repo.
5) I transfer ownership of the whole thing over to Parallax.
I presume you meant a simple replace TAB with one char ?
No.
What I meant is that we are told that in the original source a TAB is four spaces.
If you simply replace every TAB with four spaces you do not get what you want.
A TAB is not simple a representation of a number of spaces. A TAB moves you out to "tab stops" which may be positions in the line separated by a fixed number of spaces or not. Word processors often have tab stops set all over the place.
When you have tabs AND spaces used to format your code, as the P1 design does, things get even worse.
Yes, slightly smart editors can figure this out and display things correctly. Sublime Text being an example. Not all editors can. Code will get into a mess if there is not a "no-tab" rule in place.
Probably the better idea is that Parallax get's itself a github account. And then I transfer owner ship of my repo to Parallax as is.
Transferring ownership is an easy two minute job. See here: https://help.github.com/articles/how-to-transfer-a-repository
This way, whatever there is as a change history already stays intact.
Send me a P.M. when you are ready to go...
Then you can make the reset and BeMicro support changes your self:)
I am certain that I used the correct sources. After recompiling:
At startup everything is fine. P1v found and can be programmed successfully.
When I don't have an EEPROM hooked up, I am having no reset on either Nano or DE2-115. P1v can't be found after an initial run. A power cycle is required.
When I do have an EEPROM hooked up with pull-ups(nano and DE2), I can program the EEPROM and it runs fine.
However, after the initial run, it then fails to find the P1v on any attempt to program(or identify hardware) and reboots from EEPROM.
I had no reset problem after fixing the bug. My P1V resets dira and outa (as well as dirb and outb), I didn't removed outa resetting from my version of p1v.
I am using 32bit Quartus on an XP... probably doesn't matter. I am using a Mac to program. Had the same issue under bst and PropellerIDE, I wonder if this makes the difference. I have rechecked everything.
This is what I have. Unless my tired brain is confused, seems to be what is above.
// outa/dira
reg [31:0] outa;
reg [31:0] dira;
always @(posedge clk_cog)
if (setouta)
outa <= alu_r;
always @(posedge clk_cog or negedge ena)
if (!ena)
dira <= 32'b0;
else if (setdira)
dira <= alu_r;
I tried it on XP using my Nano half P1v and Propeller Tool, no luck.
Wow this is a neat system... and scary at same time.
Just to confirm the build 60050,60056-Propeller-1-Design-2014-08-11.zip compiled and loaded to my Deo Nano and is running a test serial program... YAY... Hats off to the development team.
+1 for the "which cog is running LED indicators"
Is there a limitation to the number of cogs that can be assimilated (or is that just memory dependant) !?
Likewise, if I do use FDS and then send ser.Stop before the program terminates, reset is fine...ahhhhmmmmm....no. Worked a couple of times in a row. Now, not. I'll try a different prop-plug,
lol... I have substituted every piece of code into that section... except the right piece... will have to try that later.
One of my problems is that I walk away during compile time, intending to come right back and then I find something else, equally interesting (of course:)
Tonight was a technical failure. But it sure was entertaining!
I think I can safely say that I have checked and rechecked all of the patches for the Nano with two different Prop plugs. All of them work, with or without EEPROM... if there is no FDS involved.
None of them work after an initial run (haven't tried mind robots patch with EEPROM) if FDS is used. This is true, even when I stop FDS in (my spin file) after using it. With Chip's patch, trying to identify hardware after FDS is used causes a successful reboot from the EEPROM. And on startup, in order to avoid booting from the EEPROM and to be able to reprogram the EEPROM, I disconnect the +3.3V from the EEPROM until after the power is applied to the Nano.
After applying one of the patches(not Chip's), when I disconnected the PropPlug from the powered up Nano, my Mac crashed...IDK:)
Rich,
One area that caught me out with Quartus was when using "Convert programming files" that the "Input file to convert" (*.sof) is the correct path and not the path of the same named from the copied project. This caught me out early on as none of my changes seemed to make any difference at all.
Turns out I was programming the FPGA with the "original" image and not the new image.
Maybe that's what your experiencing.
Cheers
Brian
Thanks. Tonight I made some changes using Textwrangler on my Mac. I passed them over to my xp machine. And it wouldn't compile. When I opened the file in quartus on the xp machine it was corrupted. When I fixed it in quarts it ran just fine. I owe Alters an apology. I really don't care about the reset issue, but it makes me curious. Am I the only one that can't run fds without it causing a reset problem:)?
Rich,
One area that caught me out with Quartus was when using "Convert programming files" that the "Input file to convert" (*.sof) is the correct path and not the path of the same named from the copied project. This caught me out early on as none of my changes seemed to make any difference at all.
Turns out I was programming the FPGA with the "original" image and not the new image.
Maybe that's what your experiencing.
Cheers
Brian
Just got caught out with this myself today. Copied my working directory to make some changes while keeping the original
Am I the only one that can't run fds without it causing a reset problem?
Yes!!!
I somehow got in the habit of trying to run from a .sof file... I don't know if this works on Windows... but once you power down and hook it up to a Mac, the results aren't going to be good. ROFL
Comments
If you go to:
Tools | Options | Text Editor
You can check a box that will insert spaces instead of a tab character when you hit the tab key, but that doesn't affect the existing text in your file.
Is there some other way?
In Notepad++, I see under Edit.BlankOperations, there are two 'live' choices of Tab-to-Space and Space-toTab
About the tab situation: I don't know what I'll do about this, yet. Personally, I kind of like tabs, because no matter what you type with tabs, you go to easily-identifiable offsets. Spaced indentions get smeared all over the place when I edit code, and that frustrates me, as I'm a little OCD about things lining up.
I have the patch from the TP but I notice I have a EEPROM attached on the DE0 and it doesn't like a reboot, I have to F10 it each time. Did I miss something.
BTW, I haven't had that much time to spend on this and learn Verilog on the go but I'm hoping to spend more time this week doing so, just as well! So a quick question which I should really ask on a new thread but where in the code is the bit that "rotates the propeller" to select the next cog? I can see all the bus and bus latches but maybe my eyes are playing tricks on me.
BTWA, Thanks heaps and heaps again and again.
Do you have a pull-up resistor on SDA?
In dig.v there's this section:
That bus_sel group of 8 signals is the hub rotator. They're all 0 on reset, but then a single '1' starts rotating from bit0 to bit7, and back to bit0 again, round and round. That's what determines which cog has access to the hub.
The notepad++ feature I mentioned works both ways, so you can still restore any file to TABS, and work like that, then publish with TABS to spaces. ( Or anyone who does not like TABS can do this themselves. )
Okay. I'll try this out:
http://notepad-plus-plus.org/download/v6.6.8.html
Thanks, jmg.
Yes, I have the pullup but I will double check anyway. Since I didn't really have any DIP the EEPROM is actually on another board where I have the Prop hardwired into reset. Works normally once booted and I can read other I2C devices easily.
I have been commenting source and did notice the hub in dig.v but I think I missed the import of the other part
Thanks.
Reset/Boot/Program all work fine!
Haven't tried it on my DE2 yet.
Cheers
Brian
I am surprised Quartus only replaces tabs with a single space. What a PITA.
Anyway, don't waste too much time with this. We can do this for you.. heater can you do it again?
Yes some editors can sort this out for you and display the thing correctly. Not all do. It also goes wrong in other circumstances, for example when browsing the code on the pages of GitHub. Or try cutting and pasting a snippet of that source into a post on this forum, it will be screwed.
Worst of all if you have contributors not following the "no tabs rule" you will end up with source that contains spaces and tabs all mixed up. You will get people "fixing" that formatting when they see it. This all makes viewing diffs between different versions much harder as all those non-functional space changes will show up in the diffs.
Just say no to tabs. I beg you...on my knees here...
I could but I won't. The tab free source is posted in github here : https://github.com/ZiCog/P8X32A_Emulation
It's there for the taking with a quick:
Or just hit the "Download ZIP" button on that page.
The tabs to spaces change is the only change I have made to that code so you are good to go.
By the way, I used the Sublime Text editor which can view those original files correctly and then save them with the tab issue corrected. Doing a naive tab to space swap will make a mess of things, don't do that. Just fetch my version.
Thanks for doing that. I take it these are the new files that we posted this afternoon that have the DIRA reset fix and the BeMicroCV support?
The Notepad++ Edit feature I mentioned is somewhat smarter, and works nicely in both directions, & replaces TAB with 8 chars (or whatever you have set), and going back swaps a TAB in for every adjacent 8 spaces.
Makes it easy to support both standards, if someone really wants to.
No, my gihub version is 5 days old already. It is basically as you released it with only the tabs fixed. I added a license file to the top level directory where it should be and a README.md describing what it all is. I also threw in the pdf docs for convenience.
You can see what is what by browsing the code on git hub, for example here: https://github.com/ZiCog/P8X32A_Emulation/tree/master/P8X32A_DE0_Nano where the DE0-nano files are listed together with a commit comment.
Click on that comment on a .v file and you will see all the tab to space changes that were made, yuk, this is what happens when contributors mix up spaces and tabs and generally mess with formatting.
I was just wondering about what to do with the DIRA reset fix and BeMicro support changes.
What we should do is as follows:
1) You make your self a fork of my github repo. That only requires that Parallax signs itself up for github, you then visit my repo page and hit the "fork" button. Boom you have your own clone in the Parallax account.
2) You fix up the reset and BeMicro stuff in the Parallax repo.
3) You send a "pull" request to me.
4) I pull those changes into my version from the Parallax repo.
5) I transfer ownership of the whole thing over to Parallax.
What I meant is that we are told that in the original source a TAB is four spaces.
If you simply replace every TAB with four spaces you do not get what you want.
A TAB is not simple a representation of a number of spaces. A TAB moves you out to "tab stops" which may be positions in the line separated by a fixed number of spaces or not. Word processors often have tab stops set all over the place.
When you have tabs AND spaces used to format your code, as the P1 design does, things get even worse.
Yes, slightly smart editors can figure this out and display things correctly. Sublime Text being an example. Not all editors can. Code will get into a mess if there is not a "no-tab" rule in place.
Scratch what I said above.
Probably the better idea is that Parallax get's itself a github account. And then I transfer owner ship of my repo to Parallax as is.
Transferring ownership is an easy two minute job. See here: https://help.github.com/articles/how-to-transfer-a-repository
This way, whatever there is as a change history already stays intact.
Send me a P.M. when you are ready to go...
Then you can make the reset and BeMicro support changes your self:)
At startup everything is fine. P1v found and can be programmed successfully.
When I don't have an EEPROM hooked up, I am having no reset on either Nano or DE2-115. P1v can't be found after an initial run. A power cycle is required.
When I do have an EEPROM hooked up with pull-ups(nano and DE2), I can program the EEPROM and it runs fine.
However, after the initial run, it then fails to find the P1v on any attempt to program(or identify hardware) and reboots from EEPROM.
I tried it on XP using my Nano half P1v and Propeller Tool, no luck.
Thanks.
Just to confirm the build 60050,60056-Propeller-1-Design-2014-08-11.zip compiled and loaded to my Deo Nano and is running a test serial program... YAY... Hats off to the development team.
+1 for the "which cog is running LED indicators"
Is there a limitation to the number of cogs that can be assimilated (or is that just memory dependant) !?
I went back and re-read Brian's thread http://forums.parallax.com/showthread.php/156804-Reset-issues-on-DE0-Nano-DE2-115 turns out that if my code does not use a serial terminal, it loads and resets just fine.
Likewise, if I do use FDS and then send ser.Stop before the program terminates, reset is fine...ahhhhmmmmm....no. Worked a couple of times in a row. Now, not. I'll try a different prop-plug,
Sorry.
Rich
One of my problems is that I walk away during compile time, intending to come right back and then I find something else, equally interesting (of course:)
Tonight was a technical failure. But it sure was entertaining!
None of them work after an initial run (haven't tried mind robots patch with EEPROM) if FDS is used. This is true, even when I stop FDS in (my spin file) after using it. With Chip's patch, trying to identify hardware after FDS is used causes a successful reboot from the EEPROM. And on startup, in order to avoid booting from the EEPROM and to be able to reprogram the EEPROM, I disconnect the +3.3V from the EEPROM until after the power is applied to the Nano.
After applying one of the patches(not Chip's), when I disconnected the PropPlug from the powered up Nano, my Mac crashed...IDK:)
One area that caught me out with Quartus was when using "Convert programming files" that the "Input file to convert" (*.sof) is the correct path and not the path of the same named from the copied project. This caught me out early on as none of my changes seemed to make any difference at all.
Turns out I was programming the FPGA with the "original" image and not the new image.
Maybe that's what your experiencing.
Cheers
Brian
Thanks. Tonight I made some changes using Textwrangler on my Mac. I passed them over to my xp machine. And it wouldn't compile. When I opened the file in quartus on the xp machine it was corrupted. When I fixed it in quarts it ran just fine. I owe Alters an apology. I really don't care about the reset issue, but it makes me curious. Am I the only one that can't run fds without it causing a reset problem:)?
Yes!!!
I somehow got in the habit of trying to run from a .sof file... I don't know if this works on Windows... but once you power down and hook it up to a Mac, the results aren't going to be good. ROFL