Author Topic: SoftCore debug  (Read 6760 times)

0 Members and 1 Guest are viewing this topic.

Offline legacyTopic starter

  • Super Contributor
  • ***
  • !
  • Posts: 4415
  • Country: ch
SoftCore debug
« on: July 29, 2014, 09:19:51 pm »
hi guys
i have seen that the ZPU has a jtag tap machine in its RTL level (1), so guys are trying to attach a second jtag in order to debug the firmware (the primary jtag is used to download the fpga bitstream), that's cool !

i guess, what about putting a tiny debug-processor inside the SoC, instead ?

Assuming you have enough resources to put two soft core inside your fpga(2)
the debug processor should be so cool because it can
- stop the Main Softcore's clock, at a particular PC, or at breakpoints
- access (reading/writing) the Main Softcore's registers (also to PC,  EPC, cause, cop0 and whatever …)
- access (reading/writing) the Main Softcore's local bus (so r/w its  iram/dram)

the idea is to put gdb-stub inside the tiny Debug Processor (which is validated, so you can trust it), and let it to (uart-serially-)-talk gdb-uart-protocol with the host in order to control the target !

in this ways you put much more intelligence in the debug module, which could simplify things like … attaching the host in order to control things

with a gdb-debug-processor the host could simply send commands (high level commands, also in pretty ASCII form) and gets replies instead of
hardly handling all the signals of a jtag tap machines (which also  requires … a special file, BSDL file, that describe the target from the point of
view of the TAP machine)

what do you think ?
anything around ?




(2) for example, a smaller debug-processor-Softcore made with the Xilinx PicoBlaze, which is  very essential and tiny

edit: repo's link added
(1) from the ZPU repo, see zpu.hdl.tap (vhdl source), it looks very interesting!
« Last Edit: August 03, 2014, 11:39:08 am by legacy »
 

Offline mrflibble

  • Super Contributor
  • ***
  • Posts: 2051
  • Country: nl
Re: SoftCore debug
« Reply #1 on: July 29, 2014, 11:08:48 pm »
Personally I'm more partial to using chipscope, and sometimes a small FSM to keep track of things and generate triggers for the chipscope ILA.

But maybe your picoblaze-as-debugger has some use too, when a simple ILA or ILA+FSM doesn't cut it. One thing to beware though, is that before you know it you are debugging the debugger. ;)
 

Offline legacyTopic starter

  • Super Contributor
  • ***
  • !
  • Posts: 4415
  • Country: ch
Re: SoftCore debug
« Reply #2 on: July 30, 2014, 10:52:06 am »
One thing to beware though, is that before you know it you are debugging the debugger. ;)

it the only one dogma: do not debug the debugger :-DD
 

Offline legacyTopic starter

  • Super Contributor
  • ***
  • !
  • Posts: 4415
  • Country: ch
Re: SoftCore debug
« Reply #3 on: August 03, 2014, 11:33:29 am »
Personally I'm more partial to using chipscope

i have bought an Avnet FPGA board equipped with Spartan6, it also comes with a "locked license" version of Xilinx ISE v14.7 (2 DVD provided, one of these is for ISE, which is … 15Gbyte once installed) that has the chipscope enabled. The price is cheap and it is very useful, thank you for your advice !
 

Offline mrflibble

  • Super Contributor
  • ***
  • Posts: 2051
  • Country: nl
Re: SoftCore debug
« Reply #4 on: August 03, 2014, 03:24:43 pm »
Yup, that board is nice price/performance. Especially considering the included chipscope license. :)

About chipscope, you might want to get into the habit of manually instantiating the ICON and ILA and such. The *pointy* *clickey* workflow where this gets automagically included does work, except when it mysteriously fails for bullshit reasons unknown. Maybe the underlying issue has been fixed by now (as per ISE 14.7), but I'm not waiting to find out.
 

Offline Bassman59

  • Super Contributor
  • ***
  • Posts: 2501
  • Country: us
  • Yes, I do this for a living
Re: SoftCore debug
« Reply #5 on: August 04, 2014, 04:09:00 am »
About chipscope, you might want to get into the habit of manually instantiating the ICON and ILA and such. The *pointy* *clickey* workflow where this gets automagically included does work, except when it mysteriously fails for bullshit reasons unknown. Maybe the underlying issue has been fixed by now (as per ISE 14.7), but I'm not waiting to find out.

I haven't instantiated a ChipScope core in my code in ages; I always use the core inserter. And this is going back to something like ISE 10.

It tends to fail if you change the source code and forget to open up the design in the core inserter after synthesis and before place and route. Once I got into the habit of doing that it is fine.

Plus the ability to import the .cdc file into the ChipScope Analyzer window is genius. Start the ChipScope analyzer, connect to the chip over the JTAG, and when it finds the core, do the import. Then all of the signal names in the design are matched with what's in the analyzer. Saves a lot of work renaming all of the signals.
 

Offline legacyTopic starter

  • Super Contributor
  • ***
  • !
  • Posts: 4415
  • Country: ch
Re: SoftCore debug
« Reply #6 on: August 04, 2014, 12:00:38 pm »
also, the chipscope "locked license" will expire in 1 year since when you activate it, the license manager is telling me this  :palm:
 

Offline miguelvp

  • Super Contributor
  • ***
  • Posts: 5550
  • Country: us
Re: SoftCore debug
« Reply #7 on: August 05, 2014, 03:10:43 am »
also, the chipscope "locked license" will expire in 1 year since when you activate it, the license manager is telling me this  :palm:

I don't know how is it for Xilinx toolchain, but on Altera's they have a talkback option that lets you use their signaltap features. Cypress toolchain has something similar, so maybe the Xilinx one offers it or will offer it in the future?

I like the model of free as long as you provide silent feedback, and no, they don't send your code to them :)
 

Offline legacyTopic starter

  • Super Contributor
  • ***
  • !
  • Posts: 4415
  • Country: ch
Re: SoftCore debug
« Reply #8 on: August 05, 2014, 05:10:56 pm »
I don't know how is it for Xilinx toolchain, but on Altera's they have a talkback option that lets you use their signaltap features

it seems the same with Xilinx web pack license: the ISE WebPack edition's license will never expire if you enable the talkback, unfortunately the ChipScope seems to have a different license that looks like "locked" to a workstation (you have to provide your hard disk serial number, or your built-in LAN's MAC) and time-limited  :-//
 

Offline Bassman59

  • Super Contributor
  • ***
  • Posts: 2501
  • Country: us
  • Yes, I do this for a living
Re: SoftCore debug
« Reply #9 on: August 05, 2014, 07:40:11 pm »
also, the chipscope "locked license" will expire in 1 year since when you activate it, the license manager is telling me this  :palm:

The license should be perpetual, meaning that when it "expires," you won't be able to run any version of the software newer than the license expiration date. And since ISE 14.7 (and thus ChipScope 14.7) is the end of the line, there won't be any more ChipScope updates so you're good.
 

Offline Bassman59

  • Super Contributor
  • ***
  • Posts: 2501
  • Country: us
  • Yes, I do this for a living
Re: SoftCore debug
« Reply #10 on: August 05, 2014, 07:41:55 pm »
it seems the same with Xilinx web pack license: the ISE WebPack edition's license will never expire if you enable the talkback,

You cannot disable the talkback with WebPack. Well, not without either disconnecting the network from the Internet, or doing things in your router to block whatever the talkback feature tries to access.
 

Offline legacyTopic starter

  • Super Contributor
  • ***
  • !
  • Posts: 4415
  • Country: ch
Re: SoftCore debug
« Reply #11 on: August 05, 2014, 11:02:27 pm »
The license should be perpetual, meaning that when it "expires," you won't be able to run any version of the software newer than the license expiration date

if i invoke ISE the license manager is reporting me that i have activated a locked-license on august 4, 2014 and that it will expire on august 4, 2015, this makes me thinking that when it will expire i will simply have to buy and other license that will expire in 2016, and so on (1). The license is physically a file in where there are a lot of characters probably encoded with an hash algorithm, something that probably has been made with

- an activation date, when it has been activated
- an expiration date, when it will expire
- an host ID, made with lan mac address or hard disk serial number
- a licence ID (which should implicitly contains a "license kind", a magic code that could make it permanent or not)

this is my speculation about how it could work, but i can imagine that all of these informations have been encrypted with an hash algorithm (i do not know which one) in order to make the physical license file.

btw, when i bought the AVnet board i got a piece of paper inside the box with a long string made of alphanumerical characters and i was asked to fill all of these chars into a web form, also providing my hard disk serial number, and implicitly providing the activation date, in order to get the license-file by email


(1) at work a friend of mine has exactly this working scheme with Windriver's things, he has volatile licenses that expire in X-days, when a license expires he simply buys an other  :-//



p.s. you are right, you can not disable the talkback in the WebPack, you can disable it only if you install the FULL suite.
 

Offline legacyTopic starter

  • Super Contributor
  • ***
  • !
  • Posts: 4415
  • Country: ch
Re: SoftCore debug
« Reply #12 on: August 05, 2014, 11:10:34 pm »
from the email i got from Xilinx, i know there are 4 possibilities about licenses

Quote
Certificate-Based Licenses:
 -- Node-locked Licenses
 -- Floating Licenses

Activaton-Based Licenses:
 -- Node-Locked (Client) Licenses
 -- Floating Licenses
« Last Edit: August 06, 2014, 02:36:25 am by legacy »
 

Online T3sl4co1l

  • Super Contributor
  • ***
  • Posts: 21658
  • Country: us
  • Expert, Analog Electronics, PCB Layout, EMC
    • Seven Transistor Labs
Re: SoftCore debug
« Reply #13 on: August 06, 2014, 01:05:14 am »
Clicked on thread, did not see partially open hardware with skimpy dongles attached.  Disappointed, 1/10.

Tim
Seven Transistor Labs, LLC
Electronic design, from concept to prototype.
Bringing a project to life?  Send me a message!
 

Offline legacyTopic starter

  • Super Contributor
  • ***
  • !
  • Posts: 4415
  • Country: ch
Re: SoftCore debug
« Reply #14 on: August 06, 2014, 02:30:31 am »
Clicked on thread

have you checked this ?

Quote
edit: repo's link added
(1) from the ZPU repo, see zpu.hdl.tap (vhdl source), it looks very interesting!

if so, any comment about ?
 

Online T3sl4co1l

  • Super Contributor
  • ***
  • Posts: 21658
  • Country: us
  • Expert, Analog Electronics, PCB Layout, EMC
    • Seven Transistor Labs
Re: SoftCore debug
« Reply #15 on: August 06, 2014, 02:37:37 am »
Clicked on thread

have you checked this ?

Quote
edit: repo's link added
(1) from the ZPU repo, see zpu.hdl.tap (vhdl source), it looks very interesting!

if so, any comment about ?

Don't mind me, I'm just joking... it's a Reddit style comment..

Tim
Seven Transistor Labs, LLC
Electronic design, from concept to prototype.
Bringing a project to life?  Send me a message!
 

Offline legacyTopic starter

  • Super Contributor
  • ***
  • !
  • Posts: 4415
  • Country: ch
Re: SoftCore debug
« Reply #16 on: August 06, 2014, 02:48:19 am »
that's ok, like the reddit style comment i wrote to express my disappoint with this (1) guy   :-DD

(1)
Quote
Strubi wrote
follow some simple emulation techniques as demonstrated.

Quote
Legacy wrote
where has it been "demonstrated" by examples ? i can only see this (skimpy) article.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf