mirror of
				https://github.com/YosysHQ/yosys
				synced 2025-11-04 05:19:11 +00:00 
			
		
		
		
	past_ad initial value setting
This commit is contained in:
		
							parent
							
								
									2c96ecc5f7
								
							
						
					
					
						commit
						6020ba67ac
					
				
					 1 changed files with 3 additions and 0 deletions
				
			
		| 
						 | 
				
			
			@ -256,6 +256,7 @@ struct SimInstance
 | 
			
		|||
			{
 | 
			
		||||
				ff_state_t &ff = it.second;
 | 
			
		||||
				zinit(ff.past_d);
 | 
			
		||||
				zinit(ff.past_ad);
 | 
			
		||||
 | 
			
		||||
				SigSpec qsig = it.second.data.sig_q;
 | 
			
		||||
				Const qdata = get_state(qsig);
 | 
			
		||||
| 
						 | 
				
			
			@ -793,6 +794,8 @@ struct SimInstance
 | 
			
		|||
				if (id!=0) {
 | 
			
		||||
					Const fst_val = Const::from_string(shared->fst->valueOf(id));
 | 
			
		||||
					ff.past_d = fst_val;
 | 
			
		||||
					if (ff.data.has_aload)
 | 
			
		||||
						ff.past_ad = fst_val;
 | 
			
		||||
					did_something = set_state(qsig, fst_val);
 | 
			
		||||
				}
 | 
			
		||||
			}
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue