- Check that recalculating the zoom transform in fact has a relative error of 10^-15, not absolute error. If latter, rethink transform.
- Slider positions need to be updated during zoom; have not figured out a "clean" way to do this that doesn't involve signals or unnecessary inter-object communication. I may remove the event filter completely.
- Fix FitToView and ZoomToFit idempotency.
- Related to slider-to-pixel transform having an offset of slider_width/2 pixels.
- At large zooms, the sliders start taking the wrong positions due to floating point errors?
- Remove asserts (or catch AssertionFailure) and just refuse to honor zooms at some point.
- Implement offset/magnitude visualization properly, as it seems to get stuck.
- Need to add a "max number of ticks to display" to ticker class to avoid label overlap.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from migen.fhdl.std import * | |
from migen.genlib.fifo import AsyncFIFO | |
from migen.fhdl.bitcontainer import flen | |
from migen.bank.description import * | |
class FreqCounterDebug(Module, AutoCSR): | |
def __init__(self, counter_param_list): | |
for params in counter_param_list: | |
setattr(self.submodules, params[0], FreqCounter(*params[1:])) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from migen import * | |
from migen.fhdl import verilog | |
import numpy as np | |
import matplotlib.pyplot as plt | |
import struct | |
class NCO(Module): | |
def __init__(self, out_width=8, depth=10, acc_out_width=24, base_freq=1000000, clk_freq=50000000): | |
self.norm_freq = base_freq/clk_freq | |
num_entries = 2**depth |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SolvespaceCamera = function( render_width, render_height, scale, up, right, offset ) { | |
THREE.Camera.call( this ); | |
this.type = 'SolvespaceCamera'; | |
this.render_width = render_width; | |
this.render_height = render_height; | |
this.zoom_scale = scale; /* Avoid namespace collision w/ THREE.Object.scale */ | |
this.up = up; | |
this.right = right; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SolvespaceCamera.prototype.updateProjectionMatrix = function() { | |
temp = new THREE.Matrix4(); | |
offset = new THREE.Matrix4().makeTranslation(this.offset.x, this.offset.y, this.offset.z); | |
n = new THREE.Vector3().crossVectors(this.right, this.up); | |
rotate = new THREE.Matrix4().makeBasis(this.right, this.up, n); | |
/* TODO: If we want perspective, we need an additional matrix | |
here which will modify w for perspective divide. */ | |
scale = new THREE.Matrix4().makeScale(2*this.zoom_scale, 2*this.zoom_scale, this.zoom_scale); | |
/* FIXME: Where did the negative sign in the zScale come from? |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// TODO: Why doesn't try! work? | |
let mut fp = match File::open(obj) { | |
io::Result::File(x) => { x }, | |
io::Result::Error(x) => { panic!("Error opening {}: {}", obj, x) } | |
}; | |
/* src\main.rs:62:17: 62:36 error: no associated item named `File` found for type `core::result::Result<_, std::io::error::Error>` in the current scope | |
src\main.rs:62 io::Result::File(x) => { x }, | |
^~~~~~~~~~~~~~~~~~~ | |
src\main.rs:63:17: 63:37 error: no associated item named `Error` found for type `core::result::Result<_, std::io::error::Error>` in the current scope |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
From 853153920e7f2d4b6e5bf311a57c2c3184036909 Mon Sep 17 00:00:00 2001 | |
From: "William D. Jones" <[email protected]> | |
Date: Wed, 27 Jan 2016 10:49:45 -0500 | |
Subject: [PATCH] Add test frequency counters using minispartan6 board. | |
--- | |
gateware/freq_count.py | 55 ++++++++++++++++++++++++++++++++++++++++++++ | |
targets/minispartan6_base.py | 34 +++++++++++++++++++++++++++ | |
2 files changed, 89 insertions(+) | |
create mode 100644 gateware/freq_count.py |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
make BOARD=minispartan6 TARGET=base MISOC_EXTRA_CMDLINE="-sFreqSoC -Ob source True -Ob run False" gateware |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from migen.fhdl.std import * | |
from migen.genlib.fifo import AsyncFIFO | |
from migen.fhdl.bitcontainer import flen | |
from migen.fhdl import verilog | |
class FreqCounter(Module): | |
# measured_sig: Signal to measure frequency | |
# ref_clk: counts up to a gate_time number of cycles. It should be at least | |
# twice as fast as the maximum frequency of the measured signal to avoid |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import asyncio | |
import atexit | |
import os | |
import scanwidget | |
# First two are portable between PyQt4 and 5. Remaining are not. | |
from quamash import QApplication, QEventLoop, QtGui, QtCore, QtWidgets | |