Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: m-labs/migen
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: f21e05025d45
Choose a base ref
...
head repository: m-labs/migen
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 683643266fbf
Choose a head ref
  • 3 commits
  • 2 files changed
  • 1 contributor

Commits on Sep 4, 2014

  1. Copy the full SHA
    7c19e43 View commit details
  2. vivado: add more reporting

    jordens authored and sbourdeauducq committed Sep 4, 2014
    Copy the full SHA
    4328122 View commit details
  3. Copy the full SHA
    6836432 View commit details
Showing with 10 additions and 13 deletions.
  1. +2 −2 mibuild/xilinx_vivado.py
  2. +8 −11 migen/genlib/cordic.py
4 changes: 2 additions & 2 deletions mibuild/xilinx_vivado.py
Original file line number Diff line number Diff line change
@@ -57,7 +57,7 @@ def _build_files(device, sources, vincpaths, build_name, bitstream_compression):
tcl.append("route_design")
tcl.append("report_route_status -file %s_route_status.rpt" %(build_name))
tcl.append("report_drc -file %s_drc.rpt" %(build_name))
tcl.append("report_timing_summary -file %s_timing.rpt" %(build_name))
tcl.append("report_timing_summary -max_paths 10 -file %s_timing.rpt" %(build_name))
tcl.append("report_power -file %s_power.rpt" %(build_name))
if bitstream_compression:
tcl.append("set_property BITSTREAM.GENERAL.COMPRESS True [current_design]")
@@ -72,7 +72,7 @@ def _run_vivado(build_name, vivado_path, source, ver=None):
if source:
settings = xilinx_common.settings(vivado_path, ver)
build_script_contents += "source " + settings + "\n"
build_script_contents += "vivado -mode tcl -source " + build_name + ".tcl\n"
build_script_contents += "vivado -mode batch -source " + build_name + ".tcl\n"
build_script_file = "build_" + build_name + ".sh"
tools.write_to_file(build_script_file, build_script_contents, force_unix=True)

19 changes: 8 additions & 11 deletions migen/genlib/cordic.py
Original file line number Diff line number Diff line change
@@ -285,26 +285,23 @@ def _constants(self, stages, bits):
return a, s, zmax, gain

def _stage(self, xi, yi, zi, xo, yo, zo, i, ai):
dir = Signal()
if self.cordic_mode == "rotate":
direction = zi < 0
self.comb += dir.eq(zi < 0)
else: # vector
direction = yi >= 0
self.comb += dir.eq(yi >= 0)
dx = yi>>i
dy = xi>>i
dz = ai
if self.func_mode == "linear":
dx = 0
elif self.func_mode == "hyperbolic":
dx = -dx
stmt = If(direction,
xo.eq(xi + dx),
yo.eq(yi - dy),
zo.eq(zi + dz),
).Else(
xo.eq(xi - dx),
yo.eq(yi + dy),
zo.eq(zi - dz),
)
stmt = [
xo.eq(xi + Mux(dir, dx, -dx)),
yo.eq(yi + Mux(dir, -dy, dy)),
zo.eq(zi + Mux(dir, dz, -dz))
]
return stmt

class Cordic(TwoQuadrantCordic):