To run a verilog simulation using irun and create a shm waveform file,
initial begin
$shm_open("waves.shm"); $shm_probe("AS");
end
run with irun -access +r testcase.sv
Or create this tcl file:
To run a verilog simulation using irun and create a shm waveform file,
initial begin
$shm_open("waves.shm"); $shm_probe("AS");
end
run with irun -access +r testcase.sv
Or create this tcl file:
| %% Trial FFT | |
| % http://www.mathworks.co.uk/help/matlab/math/fast-fourier-transform-fft.html | |
| fs = 48000; % Sample Rate | |
| n = 4096; % Power of 2 number of samples/ length of FFT | |
| % Get/Generate data | |
| t = 0:1/fs:(n-1)/fs; % n/fs sec sample | |
| x = (1.3)*sin(2*pi*1500*t) ... % 1.5k Hz component | |
| + (1.7)*sin(2*pi*4000*(t-2)) ... % 4.0k Hz component |
| Generic Content |
Install Gems:
gem install cowsay rainbow_say
Command line:
cowsay boo | rainbow_say
| def sqm_to_sqft(num) | |
| num*10.763910 | |
| end | |
| # http://www.espc.com/properties/details.aspx?pid=315620&sid=25446441807 | |
| data = [ | |
| [3.75, 3.32], | |
| [2.95, 2.87], | |
| [3.78, 2.47], | |
| [1.88, 1.45], |
class String
def to_bool
return true if self == true || self =~ (/(true|t|yes|y|1)$/i)
return false if self == false || self.blank? || self =~ (/(false|f|no|n|0)$/i)
raise ArgumentError.new("invalid value for Boolean: \"#{self}\"")
end
end
| # encoding: UTF-8 | |
| require 'maruku' | |
| ## TODO or maybe not, we currently cut styling -- == underlining if it is on the line after the cut off length. | |
| # would you want a snippet ending with a heading though? | |
| def maruku_html_snippet(markdown,lines=-1 ) | |
| if lines == -1 | |
| markdown_temp = markdown | |
| else |
The codecademy
| ## Idea of using $? from: | |
| ##http://tech.natemurray.com/2007/03/ruby-shell-commands.html | |
| namespace :deploy do | |
| ## name and version from | |
| ## https://github.com/mojombo/rakegem | |
| def name | |
| @name ||= Dir['*.gemspec'].first.split('.').first | |
| end |
| %% Run simulation | |
| sim_length = samples/fs_in; | |
| % [answer.t, answer.x, answer.y] = sim( 'testharness', sim_length ); | |
| paramNameValStruct.StartTime = '0.0' ; | |
| paramNameValStruct.StopTime = num2str(sim_length) ; | |
| sim_result = sim( 'testharness', paramNameValStruct); | |
| %% Get the results |