mirror of
https://github.com/Minres/RISCV-VP.git
synced 2025-12-17 08:51:35 +00:00
initial version
This commit is contained in:
27
src/vp/rst_gen.h
Normal file
27
src/vp/rst_gen.h
Normal file
@@ -0,0 +1,27 @@
|
||||
/*
|
||||
* Copyright (c) 2019 -2021 MINRES Technolgies GmbH
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <systemc>
|
||||
namespace tgc_vp {
|
||||
|
||||
class rst_gen : public sc_core::sc_module {
|
||||
SC_HAS_PROCESS(rst_gen);
|
||||
public:
|
||||
rst_gen(sc_core::sc_module_name const& nm) {
|
||||
SC_THREAD(run);
|
||||
}
|
||||
sc_core::sc_out<bool> rst_n{"rst_n"};
|
||||
private:
|
||||
void run(){
|
||||
rst_n.write(false);
|
||||
wait(100_ns);
|
||||
rst_n.write(true);
|
||||
}
|
||||
};
|
||||
|
||||
} /* namespace tgc_vp */
|
||||
Reference in New Issue
Block a user