Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Initial support for Diligent CModA7 (15T + 35T), Expanded Zybo Definition, Fix Vivado building on windows, Fixed VHDL conversion via rhea.build.toolflow.convert, added Clock.ticks property #40

Merged
merged 15 commits into from
Aug 11, 2016

Conversation

NickShaffner
Copy link
Contributor

No description provided.

@coveralls
Copy link

coveralls commented Aug 3, 2016

Coverage Status

Coverage remained the same at 70.364% when pulling 558a84f on NickShaffner:master into aae5e3f on cfelton:master.

@NickShaffner NickShaffner changed the title Fixed VHDL conversion via rhea.build.toolflow.convert, fixed a typo, fixed spacing Fixed VHDL conversion via rhea.build.toolflow.convert, added Clock.ticks property, fixed a typo, spacing Aug 5, 2016
@NickShaffner NickShaffner changed the title Fixed VHDL conversion via rhea.build.toolflow.convert, added Clock.ticks property, fixed a typo, spacing Fixed VHDL conversion via rhea.build.toolflow.convert, added Clock.ticks property, fixed a typo + spacing Aug 5, 2016
@coveralls
Copy link

coveralls commented Aug 5, 2016

Coverage Status

Coverage increased (+0.003%) to 70.367% when pulling 3fc7dd5 on NickShaffner:master into aae5e3f on cfelton:master.

@NickShaffner NickShaffner changed the title Fixed VHDL conversion via rhea.build.toolflow.convert, added Clock.ticks property, fixed a typo + spacing Fixed VHDL conversion via rhea.build.toolflow.convert, added Clock.ticks property, Clock.delay generator, fixed a typo + spacing Aug 5, 2016
@coveralls
Copy link

coveralls commented Aug 5, 2016

Coverage Status

Coverage decreased (-0.02%) to 70.34% when pulling 239a23e on NickShaffner:master into aae5e3f on cfelton:master.

@NickShaffner
Copy link
Contributor Author

@cfelton I'm a bit confused as to why Clock.gen() can override hticks via a passed in parameter - ignoring the frequency and period. I see several of the tests seem to make use of this, but I don't understand why? It seems to me that the 'official' and only way to set hticks should be through the Clock() constructor. either via the frequency parameter, or perhaps an alternate optional hticks parameter that computes frequency. Would you be amiable to me doing such a refactoring?

@coveralls
Copy link

coveralls commented Aug 5, 2016

Coverage Status

Coverage decreased (-0.01%) to 70.353% when pulling a145563 on NickShaffner:master into aae5e3f on cfelton:master.

@coveralls
Copy link

coveralls commented Aug 5, 2016

Coverage Status

Coverage decreased (-0.01%) to 70.353% when pulling a145563 on NickShaffner:master into aae5e3f on cfelton:master.

@cfelton
Copy link
Owner

cfelton commented Aug 6, 2016

I'm a bit confused as to why Clock.gen() can override hticks via a passed in parameter - ignoring the frequency and period.

In myhdl the simulation step is not tied to an absolute timescale (well there is in some cases, like trace signals). To determine what the tick/htick should be either need all the possibly clocks (to set them relative to each other), know that absolute time you want sim step to represent, or let the user set it.

In the code the absolute (1) and user (3) are currently supported but the absolute is currently tied to 1ns the user (modifying hticks) lets the user override this - cases where frequency greater than 500 MHz is desired.

When the user sets the htick, it doesn't change the frequency of the clock but rather the absolute time unit that a simulation step will represent.

"""
return self._ticks

def delay(self, count=1):
Copy link
Owner

@cfelton cfelton Aug 6, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We discussed this briefly in the issue, I don't like the name delay for this generator. In myhdl signals currently have a posedge and negedge events, what might read well is to use the plural of these:

    yield clock.posedges(10)
    yield clock.negedges(5)

or the "edge" could be an optional argument

    yield clock.edges(10)         # default is posedge, edge=True
    yield clock.edges(5, False)   # edge=False

Copy link
Contributor Author

@NickShaffner NickShaffner Aug 6, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@cfelton Thanks for the feedback.

I was originally thinking of (and would have preferred to) implement delay() as yield delay(2 * hticks). This may have better matched the myhdl delay(), but I was concerned about the fact that 2 * hticks can be off by one or two relative to simulation ticks due to their rounding. This could be corrected via separate _hticks_high and _hticks_low values but that would of course slightly impact the duty cycle in such situations.

Anyways, after your good suggestions it occurs to me that 'posedges' and 'negedges' or 'edges' really belong in Signal() and not Clock() - and may crowd Signals() currently (intentional) minimalist interface. I'll remove delay(), but leave ticks in.

@NickShaffner NickShaffner changed the title Fixed VHDL conversion via rhea.build.toolflow.convert, added Clock.ticks property, Clock.delay generator, fixed a typo + spacing Fixed VHDL conversion via rhea.build.toolflow.convert, added Clock.ticks property, fixed a typo + spacing Aug 6, 2016
@coveralls
Copy link

coveralls commented Aug 6, 2016

Coverage Status

Coverage increased (+0.02%) to 70.38% when pulling f27ca14 on NickShaffner:master into aae5e3f on cfelton:master.

@NickShaffner NickShaffner changed the title Fixed VHDL conversion via rhea.build.toolflow.convert, added Clock.ticks property, fixed a typo + spacing Fix Vivado building on windows, Fixed VHDL conversion via rhea.build.toolflow.convert, added Clock.ticks property, fixed a typo + spacing Aug 7, 2016
@NickShaffner
Copy link
Contributor Author

Sorry this pull request keeps going :) I suppose I need to figure out how to create separate pull requests in github.

@coveralls
Copy link

coveralls commented Aug 7, 2016

Coverage Status

Coverage decreased (-0.03%) to 70.332% when pulling e9506bf on NickShaffner:master into aae5e3f on cfelton:master.

…to specify full binary 'vivado.bat' for windows to find it)
@coveralls
Copy link

coveralls commented Aug 7, 2016

Coverage Status

Coverage decreased (-0.06%) to 70.305% when pulling 40e7825 on NickShaffner:master into aae5e3f on cfelton:master.

tcl += ["# create: {}".format(date_time)]
tcl += ["# by: {}".format(os.path.basename(sys.argv[0]))]
tcl += ["#\n#\n"]
tcl += ['#\n#\n# Vivado implementation script']
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What change the string string character from " to '?

tcl += ['route_design']
tcl += ['report_timing_summary -file "{}"'.format(
self.escape_path(os.path.join(self.path, self.name+'_timing.rpt')))]
tcl += ['write_bitstream -force "{}"'.format(
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Instead of changing all the strings in this file, just use the escapes in this case \". Otherwise this module will be inconsistent with the rest of the python modules.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

will do

@cfelton
Copy link
Owner

cfelton commented Aug 7, 2016

Because the build tools are not tested by travis-ci (FPGA tools not available) I will have to pull from your branch to my local computer and tests the FPGA board builds. Some of the Vivado build changes I don't understand, I want to make sure they work with multiple versions etc.

This might take me a couple days because I have MyHDL GSoC items I need to finish in this week.

@NickShaffner
Copy link
Contributor Author

@cfelton No problem or rush, and sorry that things are confusing. I've just been fixing things as I go along to get my basic flow working.

The changes were related to:

  • Quoting strings so that pathnames with spaces in them are handled correctly instead of being interpreted as two arguments
  • Escaping backslashes for vivido TCL, so that backslashes in windows paths (or elsewhere) are interpreted correctly.
  • subprocess needs the full name of the executable to call. Previously it was calling 'vivado' which works under unix, but not windows. Under windows it needs to call 'vivado.bat'.

These changes would likely also benefit the other toolflows as well, but I only have vivado installed, so can only test it there.

I'll make the changes you requested and submit another changelist later today.

@coveralls
Copy link

coveralls commented Aug 7, 2016

Coverage Status

Coverage decreased (-0.06%) to 70.305% when pulling e70f413 on NickShaffner:master into aae5e3f on cfelton:master.

@NickShaffner NickShaffner changed the title Fix Vivado building on windows, Fixed VHDL conversion via rhea.build.toolflow.convert, added Clock.ticks property, fixed a typo + spacing Initial support for Diligent CModA7 (15T + 35T), Fix Vivado building on windows, Fixed VHDL conversion via rhea.build.toolflow.convert, added Clock.ticks property Aug 7, 2016
@NickShaffner
Copy link
Contributor Author

Apologies for cramming so much stuff into this one pull request. In future, I'll separate changes into branches so they are more topical.

@coveralls
Copy link

coveralls commented Aug 7, 2016

Coverage Status

Coverage increased (+0.01%) to 70.379% when pulling 081ff00 on NickShaffner:master into aae5e3f on cfelton:master.

@coveralls
Copy link

coveralls commented Aug 7, 2016

Coverage Status

Coverage increased (+0.004%) to 70.369% when pulling c4b2260 on NickShaffner:master into aae5e3f on cfelton:master.

@NickShaffner NickShaffner changed the title Initial support for Diligent CModA7 (15T + 35T), Fix Vivado building on windows, Fixed VHDL conversion via rhea.build.toolflow.convert, added Clock.ticks property Initial support for Diligent CModA7 (15T + 35T), Expanded Zybo Definition, Fix Vivado building on windows, Fixed VHDL conversion via rhea.build.toolflow.convert, added Clock.ticks property Aug 9, 2016
@coveralls
Copy link

coveralls commented Aug 9, 2016

Coverage Status

Coverage increased (+0.01%) to 70.379% when pulling 00b304e on NickShaffner:master into aae5e3f on cfelton:master.

@coveralls
Copy link

coveralls commented Aug 9, 2016

Coverage Status

Coverage increased (+0.01%) to 70.379% when pulling 00b304e on NickShaffner:master into aae5e3f on cfelton:master.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants