simulation

VHDL - converting from level sampling to edge triggered - an intuitive explanation?

巧了我就是萌 提交于 2019-12-11 06:14:12
问题 I have the following code (a primitive "RS-232 signalling" transmitter)... LIBRARY ieee; USE ieee.std_logic_1164.all; entity SerialTX is port( baud_clk : in std_logic; data : in std_logic_vector(7 downto 0); send : in std_logic; serial_out : out std_logic := '0'; busy : out std_logic := '0' ); end entity; ---------------------------------------- architecture behavioural of SerialTX is constant IDLE_BITS : std_logic_vector(10 downto 0) := "00000000001"; signal shifter : std_logic_vector(10

finding the next states from transition matrix ? random walk Matlab simulation

。_饼干妹妹 提交于 2019-12-11 05:40:01
问题 I'm trying to model random walk mobility model in matlab I'm facing problem regarding finding the next state from a transition matrix. I have already created my state transition matrix but I dont know how to find the next state ? I know I have all the probabilities for each state from the trasition matrix but I need to actually choose based on those probability what the next state will be. can someone help me with that ? 回答1: If A is your transition matrix with rows summing to 1, then you can

VHDL/ModelSim - Could Not Find Entity

半城伤御伤魂 提交于 2019-12-11 05:28:42
问题 I am trying to simulate my VHDL file, but am running into the following error: # ** Error: (vcom-11) Could not find work.lab1. # # ** Error: (vcom-1195) Cannot find expanded name "work.lab1". # # ** Error: Unknown expanded name. # ** Error: VHDL Compiler exiting # ** Error: c:/altera/12.1/modelsim_ase/win32aloem/vcom failed. # Error in macro ./DE2_TOP_run_msim_rtl_vhdl.do line 8 # c:/altera/12.1/modelsim_ase/win32aloem/vcom failed. # while executing # "vcom -93 -work work" I compiled the code

Simulating Co-occurrence data in R

家住魔仙堡 提交于 2019-12-11 04:46:07
问题 I am trying to create a data set of co-occurrence data where the variable of interest is a software application and I want to simulate an n by n matrix where each cell has a number that says the number of times application A was used with application B. How can I create a data set in R that I can use to test a set of clustering and partitioning algorithms. What model would I use and how would I generate the data in R ? 回答1: n <- 10 apps <- LETTERS[1:n] data <- matrix(0,n,n) rownames(data) <-

Simulate user input

二次信任 提交于 2019-12-11 03:32:01
问题 Is it possible to simulate user input in android ? For example to have some service or some thread that will work in background and initiate something that will simulate user input so if we are on the home screen and simulated input(let say click) happened than the application should start if the coordinates of the simulated click point to some icon on the home screen , or let say open a clock if the simulated input points to the clock area ... or maybe if some edittext have focus and the

Splitting data and fitting distributions efficiently

ぐ巨炮叔叔 提交于 2019-12-11 00:44:37
问题 For a project I have received a large amount of confidential patient level data that I need to fit a distribution to so as to use it in a simulation model. I am using R. The problem is that I need is to fit the distribution to get the shape/rate data for at least 288 separate distributions (at least 48 subsets of 6 variables). The process will vary slightly between variables (depending on how that variable is distributed) but I want to be able to set up a function or loop for each variable

Network simulator? [closed]

旧时模样 提交于 2019-12-10 19:59:14
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 3 years ago . Do you know of software which is capable of emulating networking conditions such as constrained bandwidth, latency, closed ports, congestion, collision? Platform-specific is fine, but I'd like to be able to emulate hundreds or thousands of nodes under varying network conditions. 回答1: Fiddler can do constrained

Adding wxPython GUI elements in a pygame physics simulation

亡梦爱人 提交于 2019-12-10 18:52:44
问题 I have made a pygame physics simulation--'a projectile motion' but it lacks interactivity like accepting angle of launch,speed etc. I am wanting to add input boxes with increase decrease arrows but don't know how to go about it. Thanks for the help. 回答1: Maybe you can try PGU (Phil's pyGame Utilities). In addition to other tools, it has a library for creating GUIs. This PGU demo shows probably something similar to that you are looking for: 回答2: Try Some of these: http://wiki.wxpython.org

Simulate coin toss for one week?

五迷三道 提交于 2019-12-10 16:34:45
问题 This is not homework . I am interested in setting up a simulation of a coin toss in R. I would like to run the simulation for a week. Is there a function in R that will allow me to start and stop the simulation over a time period such as a week? If all goes well, I may want to increase the length of the simulation period. For example: x <- rbinom(10, 1, 1/2) So to clarify, instead of 10 in the code above, how do I keep the simulation going for a week (number of trials in a week versus set

Simulating streaming data

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-10 16:19:20
问题 I'm trying to write a program that will read from a flat file of data and simulate streaming it so I can test a program that reads streaming data without having to connect and start up the streaming hardware. What are the more realistic ways to accomplish this? I need it to stream at variable speeds depending on the hardware im simulating. My two ideas so far are a program that writes to a named pipe, or a program that writes to a virtual serial port at the rates I need. Is there a better