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: GlasgowEmbedded/glasgow
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 00591df2244c
Choose a base ref
...
head repository: GlasgowEmbedded/glasgow
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: c2b99cc00ea9
Choose a head ref
  • 1 commit
  • 1 file changed
  • 1 contributor

Commits on Aug 7, 2019

  1. Copy the full SHA
    c2b99cc View commit details
Showing with 8 additions and 3 deletions.
  1. +8 −3 software/glasgow/applet/audio/dac/__init__.py
11 changes: 8 additions & 3 deletions software/glasgow/applet/audio/dac/__init__.py
Original file line number Diff line number Diff line change
@@ -164,13 +164,18 @@ def build(self, target, args):
if args.frequency is None:
pulse_cyc = 0
else:
pulse_cyc = self.derive_clock(input_hz=target.sys_clk_freq,
output_hz=args.frequency * 1e6)
pulse_cyc = self.derive_clock(clock_name="modulation",
input_hz=target.sys_clk_freq, output_hz=args.frequency * 1e6)
sample_cyc = self.derive_clock(clock_name="sampling",
input_hz=target.sys_clk_freq, output_hz=args.sample_rate,
# Drift of sampling clock is extremely bad, so ensure it only happens insofar as
# the oscillator on the board is imprecise, and with no additional error.
max_deviation_ppm=0)
subtarget = iface.add_subtarget(AudioDACSubtarget(
pads=iface.get_pads(args, pin_sets=self.__pin_sets),
out_fifo=iface.get_out_fifo(),
pulse_cyc=pulse_cyc,
sample_cyc=int(target.sys_clk_freq // args.sample_rate),
sample_cyc=sample_cyc,
width=args.width,
signed=args.signed,
))